fontforge

Inverted glyph: bitmap > SVG via autotrace > glyph via fontforge

Deadly 提交于 2019-12-04 09:37:56
问题 I am trying to create a font/glyph by: taking a bitmap image creating an SVG with autotrace (on Linux) importing the outline as a glyph with python-fontforge (glyph.importOutlines(svgfile) ) This works fine except that the resulting glyph in inverted (see images). Any idea how this can be prevented, how the SVG or glyph can be inverted, or anything like that? Source bitmap: Autotraced SVG: Resulting font: 回答1: solved this simply by using potrace instead of autotrace. for reference, these are

Fontforge: Export a glyph to SVG with fontforge command line

非 Y 不嫁゛ 提交于 2019-12-04 02:35:26
问题 How to export a glyph (from its unicode) to SVG with Fontforge command line ? I also need to specify the font size and keep the original margins it has in the font. 回答1: You may have found your answer already, but I just had to do this with the latest build of FontForge. The old answer of this command: fontforge -lang=ff -c 'Open($1); SelectWorthOutputting(); foreach Export("svg"); endloop;' font.ttf From a command prompt didn't want to work on Windows10 (I assume a permission issue), but you

Inverted glyph: bitmap > SVG via autotrace > glyph via fontforge

为君一笑 提交于 2019-12-03 04:33:36
I am trying to create a font/glyph by: taking a bitmap image creating an SVG with autotrace (on Linux) importing the outline as a glyph with python-fontforge (glyph.importOutlines(svgfile) ) This works fine except that the resulting glyph in inverted (see images). Any idea how this can be prevented, how the SVG or glyph can be inverted, or anything like that? Source bitmap: Autotraced SVG: Resulting font: solved this simply by using potrace instead of autotrace. for reference, these are the steps: convert bitmap to svg (linux command line): potrace -s sourceimg.bmp use svg as glyph (python):

How to remove ligatures from a font using FontForge

爷,独闯天下 提交于 2019-12-01 06:15:00
I have a font with some ligature errors in it. This is causing problems in my Android application . I want to just remove the ligatures. How do I do that in FontForge? This question is related but it is going the other way. Fontforge Scripting how to add ligatures for a glyph This is a self answer question. My answer is below. In FontForge go to Element > Font Info > Lookups > GSUB . You should be able to select a ligature table there. Then you can click Delete to delete all the ligatures or Edit Data to choose which ligatures to delete. After pressing Edit Data you can select specific

How to convert TTF to FNT with Fontforge

若如初见. 提交于 2019-11-30 13:06:27
I have a TTF font, that needs to be converted in FNT (and ideally in pcf too). I tried Fontforge, but when I loaded font and chose to generate font - nothing could be selected from the list on the right, except "No bitmap fonts" though there was WIN FNT. Can anyone help me with this? FNT is a bitmap format while TTF is an outline/vector format. To get FNT output, you'll first need to create a bitmap strike or strikes. Fontforge can do this if it has been built with Freetype included: Go to Element -> Bitmap Strikes Available. Select the 'Win' button Under 'Point Sizes' enter the size (or sizes

Creating icon fonts with vector software (i.e. inkscape) and fontforge?

空扰寡人 提交于 2019-11-30 10:10:06
问题 Through getting some answers here and some research, I've come across a new approach to implementing icons. Rather than as images or css background, it seems you can approach icons as a font. Will this method ultimately mean creating a one file font set that has each icon assigned to a character? Because this method is so new to me I really want to sure I approach it correctly first (I see great potential... so much better than creating different icons, exporting each as it's own .png file

Setting LD_LIBRARY_PATH from inside Python

霸气de小男生 提交于 2019-11-30 06:43:57
问题 Is there a way to set specify during runtime where Python looks for shared libraries? I have fontforge.so located in fontforge_bin and tried the following os.environ['LD_LIBRARY_PATH']='fontforge_bin' sys.path.append('fontforge_bin') import fontforge and get ImportError: fontforge_bin/fontforge.so: cannot open shared object file: No such file or directory Doing ldd on fontforge_bin/fontforge.so gives the following linux-vdso.so.1 => (0x00007fff2050c000) libpthread.so.0 => /lib/libpthread.so.0

Creating icon fonts with vector software (i.e. inkscape) and fontforge?

无人久伴 提交于 2019-11-29 19:37:52
Through getting some answers here and some research, I've come across a new approach to implementing icons. Rather than as images or css background, it seems you can approach icons as a font. Will this method ultimately mean creating a one file font set that has each icon assigned to a character? Because this method is so new to me I really want to sure I approach it correctly first (I see great potential... so much better than creating different icons, exporting each as it's own .png file for every different color and size). If that's the case, it'll take a bit of memorization (especially

Setting LD_LIBRARY_PATH from inside Python

谁说我不能喝 提交于 2019-11-28 21:18:26
Is there a way to set specify during runtime where Python looks for shared libraries? I have fontforge.so located in fontforge_bin and tried the following os.environ['LD_LIBRARY_PATH']='fontforge_bin' sys.path.append('fontforge_bin') import fontforge and get ImportError: fontforge_bin/fontforge.so: cannot open shared object file: No such file or directory Doing ldd on fontforge_bin/fontforge.so gives the following linux-vdso.so.1 => (0x00007fff2050c000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f10ffdef000) libc.so.6 => /lib/libc.so.6 (0x00007f10ffa6c000) /lib64/ld-linux-x86-64.so.2