Custom UIFont baseline shifted

Here or even here you can find the solutions for you. It’s all about baseline. Note There’s a problem with installing Apple Fonts Utility on El Capitan. See https://apple.stackexchange.com/questions/211138/apple-font-tools-cannot-install-in-macbook-pro-el-capitan for a workaround. To edit these in the font you will need to download the Apple Font Tool Suite. Once you’ve installed this you need to … Read more

Convert or extract TTC font to TTF – how to? [closed]

Assuming that Windows doesn’t really know how to deal with TTC files (which I honestly find strange), you can “split” the combined fonts in an easy way if you use fontforge. The steps are: Download the file. Unzip it (e.g., unzip “STHeiti Medium.ttc.zip”). Load Fontforge. Open it with Fontforge (e.g., File > Open). Fontforge will … Read more

Finding out what characters a given font supports

Here is a method using the fontTools Python library (which you can install with something like pip install fonttools): #!/usr/bin/env python from itertools import chain import sys from fontTools.ttLib import TTFont from fontTools.unicode import Unicode with TTFont( sys.argv[1], 0, allowVID=0, ignoreDecompileErrors=True, fontNumber=-1 ) as ttf: chars = chain.from_iterable( [y + (Unicode[y[0]],) for y in x.cmap.items()] … Read more

Proper MIME type for OTF fonts

There are a number of font formats that one can set MIME types for, on both Apache and IIS servers. I’ve traditionally had luck with the following: svg as “image/svg+xml” (W3C: August 2011) ttf as “application/x-font-ttf” (IANA: March 2013) or “application/x-font-truetype” otf as “application/x-font-opentype” (IANA: March 2013) woff as “application/font-woff” (IANA: January 2013) woff2 as … Read more

tech