{"id":13721521,"url":"https://github.com/googlefonts/pyfontaine","last_synced_at":"2025-04-07T11:07:13.848Z","repository":{"id":6290324,"uuid":"7524710","full_name":"googlefonts/pyfontaine","owner":"googlefonts","description":"Python tool to check font files for language/character set support","archived":false,"fork":false,"pushed_at":"2024-05-20T22:03:44.000Z","size":5588,"stargazers_count":104,"open_issues_count":31,"forks_count":20,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-01-08T00:07:39.860Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/googlefonts/pyfontaine","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googlefonts.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-01-09T16:38:32.000Z","updated_at":"2024-11-21T04:13:49.000Z","dependencies_parsed_at":"2024-05-09T10:58:44.235Z","dependency_job_id":"96962b44-7688-4478-839e-b143faf9996b","html_url":"https://github.com/googlefonts/pyfontaine","commit_stats":{"total_commits":355,"total_committers":15,"mean_commits":"23.666666666666668","dds":"0.46760563380281694","last_synced_commit":"640dce8ac589049b2fff6365270b15326de3f054"},"previous_names":["davelab6/pyfontaine"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlefonts%2Fpyfontaine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlefonts%2Fpyfontaine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlefonts%2Fpyfontaine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlefonts%2Fpyfontaine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googlefonts","download_url":"https://codeload.github.com/googlefonts/pyfontaine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640462,"owners_count":20971557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:01:18.153Z","updated_at":"2025-04-07T11:07:13.816Z","avatar_url":"https://github.com/googlefonts.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"pyfontaine\n==========================================================\n\n|Latest PyPI Version| |Python| |Travis Build Status| |License: GPL v3|\n\npyfontaine analyses fonts for their language and character/glyph-set support.\n\nIt has a straightforward pythonic set definition format:\n\n- `simple example \u003chttps://github.com/googlefonts/pyfontaine/blob/master/fontaine/charsets/internals/africaan.py\u003e`__\n- `medium example \u003chttps://github.com/googlefonts/pyfontaine/blob/master/fontaine/charsets/internals/armenian.py\u003e`__\n- `complex example \u003chttps://github.com/googlefonts/pyfontaine/blob/master/fontaine/charsets/internals/polish.py\u003e`__\n\nAdditional definitions are downloaded from the Extensis, font-config and Unicode websites during installation, and can be updated without reinstalling.\n\nAdding your own definitions is easy.\nAll files in the `internals \u003chttps://github.com/googlefonts/pyfontaine/tree/master/fontaine/charsets/internals\u003e`__ directory are auto-detected, so just add definition files there.\n\nInstallation\n------------\n\nmacOS:\n\nFirst, install Python and the `pip \u003chttp://www.pip-installer.org\u003e`__ python package manager. This is installed by default with `homebrew \u003chttp://brew.sh/\u003e`__ python, so, install homebrew, then install the neccessary depedencies (`PyICU \u003chttps://pypi.org/project/PyICU/\u003e`__) as follows::\n\n    brew install python icu4c pkg-config;\n    export PATH=\"/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH\";\n    export PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig\";\n    export CC=\"$(which gcc)\" CXX=\"$(which g++)\";\n    pip3 install --no-binary=:pyicu: pyicu;\n\nDebian:\n\n    apt-get install libicu-dev\n\nInstall the latest release easily with pip::\n\n    pip3 install fontaine --user;\n\nTo install the latest development version::\n\n    pip3 install git+https://github.com/googlefonts/pyfontaine.git#egg=fontaine --user;\n\n\nUsage\n-----\n\nGiven a list of space separated font filenames, it returns a report with some general metadata and a language support analysis::\n\n    pyfontaine font.ttf;\n\nGiven a list of space separated unicode characters, or unicode values, it returns a list of character sets that include that character::\n\n    pyfontaine 0x0061;\n    pyfontaine ğ ø ∂;\n\nSimilarly you can find out if a font supports specific characters by also giving the filename::\n\n    pyfontaine U+C480 U+C481 font.ttf;\n\nTo output font reports in various formats::\n\n    pyfontaine --xml font.ttf;\n    pyfontaine --json font.ttf;\n    pyfontaine --csv font.ttf;\n    pyfontaine --wiki font.ttf;\n\nThe `--wiki` format produces a MediaWiki table\n(`example \u003chttps://en.wikipedia.org/wiki/DejaVu_fonts#Unicode_coverage\u003e`__)\n\nTo only show character sets from different collections::\n\n    pyfontaine --collections all font.ttf; # default\n    pyfontaine --collections pyfontaine font.ttf;\n    pyfontaine --collections uniblocks font.ttf;\n    pyfontaine --collections extensis font.ttf;\n    pyfontaine --collections fontconfig font.ttf;\n    pyfontaine --collections cldr font.ttf;\n    pyfontaine --collections subsets font.ttf;\n\nTo only show specific character sets::\n\n    pyfontaine --set africaan,adobe_latin_3 font.ttf;\n\nTo print a list of all the missing unicode values from each set::\n\n    pyfontaine --missing --set adobe_latin_3 font.ttf;\n\n To output visualisations of the coverage using `Hilbert curves \u003chttp://en.wikipedia.org/wiki/Hilbert_curve\u003e`__ (thanks for the idea, `Øyvind 'pippin' Kolås \u003chttp://github.com/hodefoting\u003e`__!):\n\n    pyfontaine --show_hilbert font.ttf; ls -l coverage_pngs/;\n\n The PNG files are stored in a new directory, ``coverage_pngs``, under the current directory.\n\nUpdate collection data\n~~~~~~~~~~~~~~~~~~~~~~\n\nYou can update remote collections data when you are online::\n\n    pyfontaine --update-data 1;\n\nPython Module\n~~~~~~~~~~~~~\n\nIt has a python module called ``fontaine``\n\nMaking a release on PyPI\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo release a new version on PyPI, create and push a new git tag with a version number following the [semver](https://www.semver.org) versioning scheme.\n\nThen set up a ``~/.pypirc`` file::\n\n    [distutils]\n    index-servers=pypi\n    \n    [pypi]\n    repository = https://pypi.python.org/pypi\n\t\t\n\t\t[server-login]\n    username = user\n    password = password\n\nThen run::\n\n    python setup.py build;\n    python setup.py sdist upload;\n\nContributing\n------------\n\nYour contributions under `the GPLv3 \u003cLICENSE.txt\u003e`__ are welcome!\n\npyfontaine is a python reimplementation of\n`Fontaine \u003chttp://fontaine.sf.net\u003e`__ by Ed Trager, and has been made by\n`Vitaly Volkov \u003chttp://github.com/hash3g\u003e`__,\n`Dave Crossland \u003chttp://github.com/davelab6\u003e`__,\n`Mikhail Kashkin \u003chttp://github.com/xen\u003e`__ and\n`Felipe Sanches \u003chttp://github.com/felipesanches\u003e`__.\n\nThanks\n------\n\nWe would like to thank some upstream projects that make pyfontaine even\nmore useful:\n\n* `Thomas Phinney \u003chttp://www.thomasphinney.com/\u003e`__ for the `WebINK Character\n  Sets \u003chttp://web.archive.org/web/20150222004543/http://blog.webink.com/custom-font-subsetting-for-faster-websites/\u003e`__\n\n* `Behdad Esfabod \u003chttp://behdad.org\u003e`__ for the `font-config languages\n  definitions \u003chttp://cgit.freedesktop.org/fontconfig/tree/fc-lang\u003e`__\n\n* Unicode Consortium for the `Unicode Blocks\n  \u003chttp://www.unicode.org/Public/UNIDATA/Blocks.txt\u003e`__\n\nDependencies\n------------\n\n- Mac OS X requires the XCode Command Line Tools to be installed\n- `fonttools \u003chttps://github.com/behdad/fonttools\u003e`__ (common) *or*\n  `freetype-py \u003chttp://code.google.com/p/freetype-py\u003e`__ (fast)\n- `lxml \u003chttp://pypi.python.org/pypi/lxml\u003e`__\n- `PyICU \u003chttp://pyicu.osafoundation.org/\u003e`__\n- `simpleHilbertCurve \u003chttps://github.com/dentearl/simpleHilbertCurve\u003e`__\n- `matplotlib \u003chttps://pypi.python.org/pypi/matplotlib\u003e`__\n- `tabulate \u003chttps://pypi.python.org/pypi/tabulate\u003e`__\n- `requests \u003chttps://pypi.python.org/pypi/requests\u003e`__\n\nRelated Projects\n----------------\n\n-  `fontaine \u003chttp://fontaine.sf.net\u003e`__\n-  `fontbakery \u003chttps://github.com/googlefonts/fontbakery\u003e`__\n-  `libunicodenames \u003chttps://bitbucket.org/sortsmill/libunicodenames\u003e`__\n\n\n.. |Latest PyPI Version| image:: https://img.shields.io/pypi/v/fontaine.svg?style=flat\n   :target: https://pypi.python.org/pypi/fontaine\n.. |Python| image:: https://img.shields.io/pypi/pyversions/fontaine.svg?style=flat\n   :target: https://pypi.python.org/pypi/fontaine\n.. |Travis Build Status| image:: https://travis-ci.org/googlefonts/pyfontaine.svg\n   :target: https://travis-ci.org/googlefonts/pyfontaine\n.. |License: GPL v3| image:: https://img.shields.io/badge/License-GPLv3-blue.svg\n   :target: https://www.gnu.org/licenses/gpl-3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglefonts%2Fpyfontaine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglefonts%2Fpyfontaine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglefonts%2Fpyfontaine/lists"}