User Tools

Site Tools


fontforge

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
fontforge [2009/10/23 05:22] – created suapapafontforge [2013/08/03 05:04] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +나눔고딕코딩 자간 수정
 +  *Element->Font Info...
 +    *OS/2->Panose->Proportion
 +      *Monosapce->Even Width
 +<code python>
 +>>> import fontforge
 +>>> font = fontforge.open('NanumGothic_Coding_Bold.ttf')
 +>>> font.os2_panose
 +(2, 13, 0, 9, 0, 0, 0, 0, 0, 0)
 +>>> font.os2_panose = (2, 13, 0, 4, 0, 0, 0, 0, 0, 0)
 +>>> font.generate('output.ttf')
 +</code>
 +<code bash>
 +$ sudo cp output.ttf /usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding_Bold.ttf 
 +$ fc-cache -r
 +</code>
 +
 +
 +폰트포지 스크립트 모드 
 +<code txt>
 +fontforge -script $(CURDIR)/debian/fix-bold-styles.pe $$T || \
 +mv output.ttf $$T;
 +</code>
 +스크립트 예제. 은폰트 데비안 패키지에서 발췌
 <code txt> <code txt>
 #!/usr/bin/fontforge #!/usr/bin/fontforge
Line 19: Line 43:
 Generate("output.ttf") Generate("output.ttf")
 </code> </code>
 +====== python-fontforge ======
 +install
 +<code bash>
 +$ sudo apt-get install python-fontforge
 +</code>
 +예제
 +<code python>
 +>>> import fontforge
 +>>> font = fontforge.open('/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding.ttf')
 +>>> len(font)
 +73119
 +</code>
 +====== references ======
 +  *[[http://tinkerhouse.net/log/python-fontforge-is-definitely-a-godsend/|Python-fontforge is definitely a godsend]]
 +  *[[http://fontforge.sourceforge.net/python.html|Writing python scripts to change fonts in FontForge]]
fontforge.1256275369.txt.gz · Last modified: 2013/08/03 05:04 (external edit)