FontTool | A tool to make 3ds font CIAs | User Interface library

 by   astronautlevel2 Python Version: v1.2 License: Non-SPDX

kandi X-RAY | FontTool Summary

kandi X-RAY | FontTool Summary

FontTool is a Python library typically used in User Interface applications. FontTool has no bugs, it has no vulnerabilities and it has low support. However FontTool build file is not available and it has a Non-SPDX License. You can download it from GitHub.

This tool takes a font file with the format .bcfnt, which can be generated using the CTR SDK, and converts it into a CIA installable onto a 3DS system. It requires 3dstool, ctrtool, and make_cia to function.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              FontTool has a low active ecosystem.
              It has 9 star(s) with 2 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 2 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of FontTool is v1.2

            kandi-Quality Quality

              FontTool has no bugs reported.

            kandi-Security Security

              FontTool has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              FontTool has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              FontTool releases are available to install and integrate.
              FontTool has no build file. You will be need to create the build yourself to build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed FontTool and discovered the below as its top functions. This is intended to give you an instant insight into FontTool implemented functionality, and help decide if they suit your requirements.
            • Run command in subprocess .
            • Remove cbf files .
            Get all kandi verified functions for this library.

            FontTool Key Features

            No Key Features are available at this moment for FontTool.

            FontTool Examples and Code Snippets

            No Code Snippets are available at this moment for FontTool.

            Community Discussions

            QUESTION

            The font becomes thinner after editing
            Asked 2021-Jan-29 at 09:15

            I want remove unnecessary symbols from font «SFUI Text Regular». File size 104kb.

            1. FontForge

            Tried use FontForge. Deleted ~50% symbols. Save font. Tried use on the website. Result: the file size has decreased (104kb > 35kb), but the letters are thinner than originally. (i am sure, that this is wasn't system font, it's same font, but thinner)

            1. Fonttools

            Tried use fonttools, pyftsubset command.

            ...

            ANSWER

            Answered 2021-Jan-29 at 09:15

            I tried few more programs and services for this.

            FontCreator Pro helped decide problem. No specific settings. I just opened it, deleted characters, saved it.

            Source https://stackoverflow.com/questions/65922857

            QUESTION

            An unclear requirements.txt error which results in not being able to install
            Asked 2021-Jan-17 at 12:41

            From today, I started getting error while installing modules from requirements.txt, I tried to find the error module and remove it but I couldn't find.

            ...

            ANSWER

            Answered 2021-Jan-17 at 12:41

            Create a list of all the dependencies and run the following code.

            Source https://stackoverflow.com/questions/65759809

            QUESTION

            How to convert a set of images into a font `.ttf` file with python?
            Asked 2020-Dec-11 at 15:36
            Scenario

            I have a set of images named 32.png,..,126.png of handwritten letters pertaining to the ASCII printable characters of the number in the filenames, and I intend to convert these into a font file, like .ttf such that I can type (basic) latex letters with it.

            After going through the documentation of project description and documentation of fonttools I have not yet been able to determine how to convert these images into a .ttf font file in python.

            It appears I could convert the .png images into .svg format as the fonttools is normally used for font vectors, but I did not find a method that outputs a font file. Hence I wike to ask:

            Question

            How can I convert a set of images (either .png or .svg) into a .ttf font in python?

            Attempts
            1. After installing fontforge on windows and adding the ../FontForgeBuilds/bin folder to path, Anaconda does not recognize the fontforge module as it throws error:

            ModuleNotFoundError: No module named 'fontforge' in a script that converts .svg files into .ttf files. The script named svgs2ttf is called with command:python svgs2ttf.py examples/example.json.

            ...

            ANSWER

            Answered 2020-Dec-11 at 15:36

            FontForge is not a python module but separate software. Hence, instead of calling FontForge from a python script, one can call python from a fontforge executable. Since I wanted to create the font in .ttf format from a python script, I wrote an additional python script named execute.py which executes a cmd command that executes fontforge that executes the python svgs2ttf script.

            The execute.py contains:

            Source https://stackoverflow.com/questions/63380545

            QUESTION

            In what table of the ttf font is the actual size of the symbol?
            Asked 2020-Oct-31 at 09:58

            Question: Which font table contains data about the actual size of a lowercase character. I.e., the size that we actually see on the screen when this character is displayed. Please tell me the name of the table that contains this data. If they are not in the tables, then tell me how to calculate these values.

            If anything, I write Python code using fontTools

            ...

            ANSWER

            Answered 2020-Oct-31 at 09:58

            Glyphs' heights are not specified anywhere (at least, not for a horizontal layout). Probably, what you're looking for is sxHeight from the 'OS/2' table (the distance between the baseline and the approximate height of non-ascending lowercase letters). There's also sxCapHeight field (for uppercase letters). Though, those fields were defined in the second version of the OS/2 table.

            To find out the glyph's height, you can simply subtract its lowest point from the highest one (i.e. glyph height = yMax - yMin). yMax and yMin are stored in Glyph Header in the 'glyf' table (for TrueType outlines).

            If you need glyphs' widths, 'hmtx' table contains an advance width for every glyph in a font, as well as left-side and right-side bearings. 'hhea' table contains a maximum advance width value (advanceWidthMax).

            Source https://stackoverflow.com/questions/64616845

            QUESTION

            How do I convert a woff2 font to ttf using fonttools in Python?
            Asked 2020-Jul-03 at 08:35

            I have woff2 files that I would like to convert to ttf using Python and the fonttools library. I have seen some methods on how to convert ttf fonts to woff2 but I can't use them to do the opposite.

            Thanks in advance

            ...

            ANSWER

            Answered 2020-Jul-03 at 08:35

            I figured it out one can use fontTools.ttLib.woff2.decompress() to acheive this

            Source https://stackoverflow.com/questions/62652904

            QUESTION

            Python3 character maps to (MINGW64, Windows 10)?
            Asked 2020-Jun-22 at 18:40

            I try to use this code, that I found on https://superuser.com/questions/876572/how-do-i-find-out-which-font-contains-a-certain-special-character/1452828, on MINGW64 Python3 on a Windows 10 machine:

            ...

            ANSWER

            Answered 2020-Jun-22 at 18:40

            MingGW's console is converting the string to the console encoding (cp1252 from the error message`) and that encoding doesn't support the full range of Unicode characters.

            The standard Windows console does not get the error. Below is a cut-and-paste from the cmd.exe Windows console.

            Source https://stackoverflow.com/questions/62513266

            QUESTION

            module on test.pypi can't install dependencies, even thoug they exist
            Asked 2020-Mar-26 at 16:11

            I have done this small package that I want to distribute in my community. It is now on test.pypi and when I want to try to install it, it gives an error that dependencies couldn't be found.

            setup.py

            ...

            ANSWER

            Answered 2020-Mar-26 at 16:11

            -i URL, or --index-url URL means "use URL for installing packages from exclusively". By passing -i https://test.pypi.org/simple/, you thus prohibit searching and downloading packages from PyPI (https://pypi.org/simple). To use both indexes, use --extra-index-url:

            Source https://stackoverflow.com/questions/60868060

            QUESTION

            fonttools convert ttf to woff2
            Asked 2020-Feb-04 at 04:32

            Currenly, I'm using fonttools(https://github.com/fonttools/fonttools) to convert font file ttf to woff2 by ttx command with 2 steps

            • convert ttf to ttx
            • then convert ttx to woff2

            But it's too slow and ttx file to big, is there any way to convert ttf to woff2 directly by using fonttools to improve performance?

            ...

            ANSWER

            Answered 2020-Feb-04 at 04:32

            With fonttools installed in your Python (virtualenv, pipenv, etc):

            Source https://stackoverflow.com/questions/60049960

            QUESTION

            ImportError: cannot import name redirect_stderr
            Asked 2019-Sep-19 at 16:47

            I think this somehow related to installed Python, but I have no clue how to fix it.

            This is what I have:

            ...

            ANSWER

            Answered 2019-Sep-19 at 15:24

            You need to uninstall fontTools and then install the py27 branch of it. The version you are using isn't backwards compatible to Python 2.7

            Source https://stackoverflow.com/questions/58014172

            QUESTION

            How to use fontTools to detect Type 1 and OpenType CFF fonts
            Asked 2019-May-04 at 19:33

            I know that it's possible to detect Type 1 and OpenType CFF (“PostScript flavored OpenType”) fonts by checking the first 4 bytes for 'OTTO' (0x4F54544F).

            How would I do this in Python with the fontTools library? I.e., which font table would I need to check for this value?

            ...

            ANSWER

            Answered 2019-May-04 at 19:33

            The version is stored in the font file header, not in a font data table. If you have a ttLib.TTFont object (i.e. you've opened a font file with fontTools), you can look at the .sfntVersion attribute of your TTFont object to get the version (which will usually be either 0x00010000/Version 1 or 0x4F54544F/OTTO, but there are other possible values, see below). But that kind of assumes you've already created a TTFont object by opening a font file, so this might be a kind of chicken-and-egg issue. If you're interested in knowing the version before you attempt to open the file/create a TTFont, you'll have to sniff the first four bytes (at least), outside of fontTools.

            Note: I'm a little confused by your question. You mention Type 1, which is indeed a kind of PostScript font, but not (usually) the kind in OpenType/sfnt-housed fonts (that would be Type 2, "Compact Font Format", or CFF). There is supposedly a way to store Type 1 in OpenType/sfnt-housed fonts; Apple mentions this in their TrueType Reference manual:

            The values 'true' (0x74727565) and 0x00010000 are recognized by OS X and iOS as referring to TrueType fonts. The value 'typ1' (0x74797031) is recognized as referring to the old style of PostScript font housed in a sfnt wrapper. The value 'OTTO' (0x4F54544F) indicates an OpenType font with PostScript outlines (that is, a 'CFF ' table instead of a 'glyf' table). Other values are not currently supported.

            So if typ1 is in fact what you're asking about, you could look for 0x74797031/"typ1" in the first four bytes of the file. But actual typ1 sfnt-housed fonts are exceedingly rare -- like almost non-existent. The overwhelming majority of actual Type 1 fonts will be in either .PFA/.PFB files (for non-Mac platforms), or in a "Printer Font" file (pre-OS X Mac), which would be paired with the old resource-fork "suitcase" file containing bitmaps. Type 1 font files will have %!PS-AdobeFont-1 as the first bytes of the file.

            Source https://stackoverflow.com/questions/55966692

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install FontTool

            You can download it from GitHub.
            You can use FontTool like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/astronautlevel2/FontTool.git

          • CLI

            gh repo clone astronautlevel2/FontTool

          • sshUrl

            git@github.com:astronautlevel2/FontTool.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link