[prev in list] [next in list] [prev in thread] [next in thread]
List: freetype
Subject: [ft] FT outline and standalone fonts
From: Kirk Wallace <kwallace () wallacecompany ! com>
Date: 2014-12-05 0:53:33
Message-ID: 5481020D.5050203 () wallacecompany ! com
[Download RAW message or body]
Hello. I'm trying to get an idea of a good way to present a font list,
then render a sample for each list item and also for th users text
string. I'm not a strong programmer. I tend to look for example programs
and beat on them until I get what I want, ... or not.
My application is based on TrueType Tracer,
http://timeguy.com/cradek/01276453959
which is a command line application that takes in a text string, font
file name, and other bits, then spits out g-code that may be used to cut
or engrave the string on a CNC machine. I'm working on a front-end
with Linux, Glade, GTK and Python that presents a list of font file
names from an application font subdirectory, then renders a sample of
"AaBb123" next to the font name, and also renders a sample of the user's
text. I attached a screenshot or see this link:
http://wallacecompany.com/tmp/Screenshot_engrave-1a.png
I have it mostly working, except for:
1.) The font sample render uses the system font rather than the
application font so if it is not installed, I get a generic sample.
TTTracer doesn't have this problem because the command uses the font
file path and name. My sample renderer takes a font name and family and
seems to look to the system for the closest match.
2.) The sample and user text render fills in the character body, but the
characters will be cut only on the outline. Also, CamBam stick fonts:
http://www.mrrace.com/CamBam_Fonts/
are needed, which have an outline but is so narrow that the sample
render can't be seen.
I haven't found a solution for using uninstalled fonts, but I thought I
might find a utility that worked like TTTracer but outputs a graphic. I
happened upon an example that used Pango and Cairo which produced the
outline render which fixes the outline fonts, plus makes the stick fonts
visible, but this seems like the long way around and still has the
problem with my local only fonts.
I would appreciate any hints on a better approach or links to examples
or documents to study.
I am looking at dissecting TTTracer to maybe change the output type, but
that is a bit above my skill level.
Thanks for any help.
--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/
["Screenshot_engrave-1a.png" (image/png)]
_______________________________________________
Freetype mailing list
Freetype@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic