fontforge

Generate TTF from PNG/SVG files using FontForge

一笑奈何 提交于 2021-02-08 11:38:41
问题 I'm trying to generate a ttf font file from a bunch of SVGs or PNGs. Every time I try, I get the error: "Warning: Font contained no glyphs" I've tried this on Mac and Linux: font = fontforge.font() glyph = font.createChar(65, "font1") glyph.importOutlines("1.png") glyph2 = font.createChar(66, "font2") glyph2.importOutlines("2.png") glyph3 = font.createChar(67, "font3") glyph3.importOutlines("3.png") font.generate("output.ttf") I tried the hints on: Import a sequence of .svg files into

Pip install fontforge, says Couldnot find a version

落花浮王杯 提交于 2021-02-07 14:15:22
问题 I have done, apt-get install fontforge on my ubuntu system. When i do import fontforge in my python code, it throws error as, No module named fontforge . When i do, pip install fontforge , it throws error as,, Could not find a version that satisfies the requirement fontforge (from versions: ) No matching distribution found for fontforge How can i install fontforge's python libs? 回答1: You may want to install python-fontforge . sudo apt-get install python-fontforge After that you should be able

Pip install fontforge, says Couldnot find a version

不羁岁月 提交于 2021-02-07 14:13:18
问题 I have done, apt-get install fontforge on my ubuntu system. When i do import fontforge in my python code, it throws error as, No module named fontforge . When i do, pip install fontforge , it throws error as,, Could not find a version that satisfies the requirement fontforge (from versions: ) No matching distribution found for fontforge How can i install fontforge's python libs? 回答1: You may want to install python-fontforge . sudo apt-get install python-fontforge After that you should be able

How can I scale a glyph down vertically while keeping the vertical stroke widths the same (and not altering any of the horizontal dimensions)?

自古美人都是妖i 提交于 2021-01-29 16:21:29
问题 I'm using FontForge. I'm modifying the lower case q to make a straight-stalked 9. The q has 2 logical parts, the stalk, and the 'c'. The 'c' is too big vertically. How can I scale it down vertically while keeping the vertical stroke widths the same (and not altering any of the horizontal dimensions)? I'm a novice with FontForge, so please spell out your explanation and provide step-by-step instructions. Thanks for your help. 回答1: It sounds like you want to decrease the x-height of the 'q'

How to import fontforge to python in windows 7

﹥>﹥吖頭↗ 提交于 2020-07-05 07:50:28
问题 Environment: Win 7, Python 3.4, Sublime Text 2 I am trying to use fontforge as in following example, by importing fontforge in *.py: import fontforge font = fontforge.open('blank.sfd') ... However, I haven't found any help for win 7 on where (or which subset) to include fontforge binary in my project to make it work. Any ideas, please? Thanks Edit: I was trying to build it with pyextension in win 7 as described here: http://fontforge.org/source-build.html#MS via cygwin it fails on executing .

How to import fontforge to python in windows 7

与世无争的帅哥 提交于 2020-07-05 07:50:10
问题 Environment: Win 7, Python 3.4, Sublime Text 2 I am trying to use fontforge as in following example, by importing fontforge in *.py: import fontforge font = fontforge.open('blank.sfd') ... However, I haven't found any help for win 7 on where (or which subset) to include fontforge binary in my project to make it work. Any ideas, please? Thanks Edit: I was trying to build it with pyextension in win 7 as described here: http://fontforge.org/source-build.html#MS via cygwin it fails on executing .

vertical-align和line-height的理解及实例

↘锁芯ラ 提交于 2020-05-09 07:45:36
line-height 字符实际大小和font-size的关系: 下图中不同字体font-size都是100px 测量了一下每个 span 的高度:Helvetica 115px,Gruppo 97px,Catamaran 164px。 所以,font-size 相同,font-family 不同,得到的 span 元素的高度也不同,为什么会这样呢,我们先了解下字体设计时,字符的结构: 一款字体会定义一个 em-square,设计时,宽高可以定位1000、 1024、2048px,显示到屏幕时上时,根据实际的font-size进行缩放,比如em-square为1000,font-size为100时,会把字体缩小到十分之一,但是字体的实际内容区域并不局限于em-square,它可以超出em-square,如下图所示: 下图是一个字体设计时,需要指定的各个部分,每个部分都要设置特定的值 图中ascender+ descender的高度就是字体中每个字符占据的高度(content-area)(实际显示时,是根据font-size大小来缩放的)(各个字符实际显示的高度可能不一样,如图中h和j,但是同一个字体,font-size相同的情况下,content-area都是一样大的) 图中ascender+ descender+line gap(leading)的高度,就是默认情况下,line