<h1 align='center'> flask_fontpicker </h1>
<h3 align='center'>A Flask extension for Jquery-ui google font picker, it makes adding and customizing multiple font pickers simpler and less time consuming.</h3>
## Install:
#### - With pip
> - `pip install Flask-Fontpicker` <br />
#### - From the source:
> - `git clone https://github.com/mrf345/flask_fontpicker.git`<br />
> - `cd flask_fontpicker` <br />
> - `python setup.py install`
## Setup:
#### - Inside Flask app:
```python
from flask import Flask, render_template
from flask_bootstrap import Bootstrap
from flask_fontpicker import fontpicker
app = Flask(__name__)
Bootstrap(app)
fontpicker(app)
```
#### - Inside jinja template:
```jinja
{% extends 'bootstrap/base.html' %}
{% block scripts %}
{{ super() }}
{{ fontpicker.loader() }} {# to load jQuery-ui #}
{{ fontpicker.picker(ids=["#dp"]) }}
{% endblock %}
{% block content %}
<form class="verticalform">
<input type="text" id="dp" class="form-control" />
</form>
{% endblock %}
```
## Settings:
#### - Options:
> The accepted arguments to be passed to the `fontpicker.picker()` function are as follow:
```python
def picker(self, ids=["#fontpicker"], # list of identifiers will be passed to Jquery to select element
families='["Droid Sans", "Roboto", "Roboto Condensed", "Signika"]',
# list of the font families to be displayed
loadAll='true', # to load all the selected fonts
default='Roboto', # default font to load at first
urlCss='', # to load fonts with local css file
spaceChar='+'): # spacing character used in local css file
```
#### - Local source:
> by default the extension will load Jquery-ui plugin from [a remote CDN][25530337]. Although you can configure that to be locally through passing a list of .js and .css files into the fontpicker module like such:
```python
fontpicker(app=app, local=[
'static/js/jquery-ui.js',
'static/css/jquery-ui.css',
'static/js/webfont.js',
'static/css/webfont.select.css',
'static/js/webfont.select.js'
])
```
_The order in-which the items of list are passed is not of importance, it will be auto detected via file extension_
[25530337]: https://code.jquery.com/ui/ "Jquery-ui CDN"
## Credit:
> - [Fontpicker][1311353e]: jQuery-ui web google font picker extension.
[1311353e]: https://www.jqueryscript.net/text/Google-Web-Font-Picker-Plugin-With-jQuery-And-jQuery-UI-Webfont-selector.html "jQuery-UI scripts page"
Raw data
{
"_id": null,
"home_page": "https://github.com/mrf345/flask_fontpicker/",
"name": "Flask-Fontpicker",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "flask, extension, web, google, font, picker, Jquery-UI, fontpicker",
"author": "Mohamed Feddad",
"author_email": "mrf345@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/39/62/4dfd3ebff9e6b49fac6268b26f316774566a2a8aec3855a90c8db114c14a/flask_fontpicker-0.3.tar.gz",
"platform": "any",
"description": "<h1 align='center'> flask_fontpicker </h1>\n<h3 align='center'>A Flask extension for Jquery-ui google font picker, it makes adding and customizing multiple font pickers simpler and less time consuming.</h3>\n\n## Install:\n#### - With pip\n> - `pip install Flask-Fontpicker` <br />\n\n#### - From the source:\n> - `git clone https://github.com/mrf345/flask_fontpicker.git`<br />\n> - `cd flask_fontpicker` <br />\n> - `python setup.py install`\n\n## Setup:\n#### - Inside Flask app:\n```python\nfrom flask import Flask, render_template\nfrom flask_bootstrap import Bootstrap\nfrom flask_fontpicker import fontpicker\n\napp = Flask(__name__)\nBootstrap(app)\nfontpicker(app)\n```\n\n#### - Inside jinja template:\n```jinja\n{% extends 'bootstrap/base.html' %}\n{% block scripts %}\n {{ super() }}\n {{ fontpicker.loader() }} {# to load jQuery-ui #}\n {{ fontpicker.picker(ids=[\"#dp\"]) }}\n{% endblock %}\n{% block content %}\n <form class=\"verticalform\">\n <input type=\"text\" id=\"dp\" class=\"form-control\" />\n </form>\n{% endblock %}\n```\n\n## Settings:\n#### - Options:\n> The accepted arguments to be passed to the `fontpicker.picker()` function are as follow:\n```python\ndef picker(self, ids=[\"#fontpicker\"], # list of identifiers will be passed to Jquery to select element\n families='[\"Droid Sans\", \"Roboto\", \"Roboto Condensed\", \"Signika\"]',\n # list of the font families to be displayed\n loadAll='true', # to load all the selected fonts\n default='Roboto', # default font to load at first\n urlCss='', # to load fonts with local css file\n spaceChar='+'): # spacing character used in local css file\n```\n\n#### - Local source:\n> by default the extension will load Jquery-ui plugin from [a remote CDN][25530337]. Although you can configure that to be locally through passing a list of .js and .css files into the fontpicker module like such:\n```python\nfontpicker(app=app, local=[\n 'static/js/jquery-ui.js', \n 'static/css/jquery-ui.css', \n 'static/js/webfont.js',\n 'static/css/webfont.select.css',\n 'static/js/webfont.select.js'\n ])\n```\n_The order in-which the items of list are passed is not of importance, it will be auto detected via file extension_\n\n[25530337]: https://code.jquery.com/ui/ \"Jquery-ui CDN\"\n\n## Credit:\n> - [Fontpicker][1311353e]: jQuery-ui web google font picker extension.\n\n [1311353e]: https://www.jqueryscript.net/text/Google-Web-Font-Picker-Plugin-With-jQuery-And-jQuery-UI-Webfont-selector.html \"jQuery-UI scripts page\"\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "web font picker flask extension",
"version": "0.3",
"project_urls": {
"Download": "https://github.com/mrf345/flask_fontpicker/archive/0.3.tar.gz",
"Homepage": "https://github.com/mrf345/flask_fontpicker/"
},
"split_keywords": [
"flask",
" extension",
" web",
" google",
" font",
" picker",
" jquery-ui",
" fontpicker"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "397e24bbcc8f0e4fc8f1e96c77426ce124f360052563e0ab7fccf86da5bb96ae",
"md5": "8379c59ef55a65c31b25e4a3ec866fb2",
"sha256": "a52921c912e1ca9fc16be37d7acd108ee8007935539ebef0597c0de641715446"
},
"downloads": -1,
"filename": "flask_fontpicker-0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8379c59ef55a65c31b25e4a3ec866fb2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4749,
"upload_time": "2025-08-08T22:26:02",
"upload_time_iso_8601": "2025-08-08T22:26:02.791603Z",
"url": "https://files.pythonhosted.org/packages/39/7e/24bbcc8f0e4fc8f1e96c77426ce124f360052563e0ab7fccf86da5bb96ae/flask_fontpicker-0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "39624dfd3ebff9e6b49fac6268b26f316774566a2a8aec3855a90c8db114c14a",
"md5": "3a79203078f8215bdfc20c647a7e36fc",
"sha256": "4d52c0af97e5c2ef6e083494b59340122761b8a7881d5297d059453a7996bd9a"
},
"downloads": -1,
"filename": "flask_fontpicker-0.3.tar.gz",
"has_sig": false,
"md5_digest": "3a79203078f8215bdfc20c647a7e36fc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4643,
"upload_time": "2025-08-08T22:26:04",
"upload_time_iso_8601": "2025-08-08T22:26:04.392767Z",
"url": "https://files.pythonhosted.org/packages/39/62/4dfd3ebff9e6b49fac6268b26f316774566a2a8aec3855a90c8db114c14a/flask_fontpicker-0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-08 22:26:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mrf345",
"github_project": "flask_fontpicker",
"github_not_found": true,
"lcname": "flask-fontpicker"
}