freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] FT outline and standalone fonts


From: Kirk Wallace
Subject: [ft] FT outline and standalone fonts
Date: Thu, 04 Dec 2014 16:53:33 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

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/

Attachment: Screenshot_engrave-1a.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]