fontmin
fontmin copied to clipboard
Bug? Whitespace trimming
my command:
text="`cat subset.txt`" && node_modules/.bin/fontmin -t "$text" fonts/lato/lato__latofonts_com.ttf > fonts/lato/lato__fontmin.ttf
in subset.txt:
! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~©«»ЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяё‐‑‒–—―‘‚“„…‰™
whitespace character is in the set but when I open the .ttf in FontForge, I see that the space character in the font is missing. 空白字符是集合 但是当我在FontForge打开.TTF,我看到,在字体的空格字符缺失。
I thought this was strange as well. If you pass trim: false in the opts it will include the space. The downside is that for certain fonts it is replacing the space with some other glyph. This leads to another bug. See https://github.com/ecomfe/fontmin/issues/43