Mailing list archives : pcb-rnd

Date:Tue, 22 Sep 2020 12:59:05 +0200 (CEST)
Subject:[pcb-rnd] new: ttf import
replies: 4393 from
Hi all,
I had this on the TODO for long, plus the latest feature request polling 
yielded it too, and Erich contributed the cubic curve approximation 
code... so now we have ttf import.
It lives in the import_ttf plugin, which gets compiled if you have 
libfreetype installed. Since gtk depends on freetype (through other 
spaceship libraries), most pcb-rnd users are normaly have it installed 
1. What it does NOT do
No unicode in our text or font - pcb-rnd is still a simple, ASCII 
software, so any character in any text object is 8 bits wide, there's no 
exception, no trickery.
No native ttf rendering - we import and convert glyphs from ttf fonts into 
native pcb-rnd font. The first time you see any glyph appear on your 
screen, it's already pcb-rnd font.
2. What it does do
Pcb-rnd supports multiple fonts for many years by now. You can keep our 
simple, stroked default font and import various ttf fonts as extra pcb-rnd 
fonts. Then for each text object you can tell pcb-rnd which font to use 
for rendering.
You can do partial ttf imports and you can tell where to import within the 
code page. That is, you can create a font with a random mapping. A trivial 
example is that you can import the usual 7 bit ASCII (English 
alphanumerics and punctuations) and then use the upper 128 slots for 
importing the (c) sign, a few greek letters, omega, mu, etc. 
We can import any outline defined font format that libfreetype supports, 
so not only ttf, but some type 1 and opentype fonts. The only requirements 
are that libfreetype need to support the format and the font needs to be 
in a vector graphics, outline defined format Note: in theory ttf can be 
non-outline defined (in which case we can't use it).
As usual, we have both CLI and GUI support. 
CLI documentation:
The GUI is has the same syntax and parameters, it's just a wrapper around 
the CLI. The GUI is accessible from the File/Import menu, in case you have 
the plugin compiled.
All operations are done on the currently selected font (use the fontsel 
action to change the selection).
You can choose to import with lines tracing the outline (make sure you set 
text thickness to something thin, like 1 mil, in the text object!) or 
import as polygons. This choice doesn't affect the usabulity of the 
resulting pcb-rnd font: you can put anything on silk, copper, mask, paste 
or in fact any layer you like.
You can use the built-in font editor after the import (the fontedit 
action). That way you can fine tune and save the converted font.
3. Disclaimer
We do convert the font on import. When you decide to use a font, you have 
to know fonts are coming with licenses. You need to check whether the 
license of the font allows conversion to other format before you import 
the font. Same consideration goes if you decide to share the converted 
font: you need to check if the original font license allows you to 
distribute modified (converted) variants.
Best regards,

Reply subtree:
4392 [pcb-rnd] new: ttf import from
  4393 Re: [pcb-rnd] new: ttf import from
    4394 Re: [pcb-rnd] new: ttf import from
      4395 Re: [pcb-rnd] new: ttf import from