[Scribus] Re: [pre-Patch] identify Mac fonts

Andreas Vox vox
Sun Mar 20 03:59:43 CET 2005


Hi friends of Mac & fonts!


Here's the next patch to identify font types by content.

Please try to break it, ie. find fonts where it doesn't tell the 
correct type.
Result codes are as follows:

TYP=1 Postscript Type1
TYP=2 Truetype
TYP=3 Opentype

TYP=-1 file not found
TYP=-2 file not readable
TYP=-3 format error
TYP=-4 format not supported

Usage:

	fontutil <path-to-font>
or
	fontutil <path-to-font>   <new-font-file>

The second form extracts the font data for embedding; existing files 
get overwritten.
Example:

	./fontutil  /Library/Fonts/Arial  ArialCopy.ttf

Haven't tested this part much. In theory it should be able to extract 
TTF/OTF fonts
from .dfont files; and Postscript, TTF and OTF fonts from Mac resource 
forks or
MacBinaries.

Known issues:

* extracts only the first font if a file contains more than one
* doesn't tell if PFA or PFB
* doesn't check much
* Haven't tested symlinks and aliases


You can compile the file with:

	g++ -o fontutil -I$QTDIR/include -L$QTDIR/lib/ -lqt-mt fontutil.cpp


Ciao
/Andreas

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fontutil.cpp
Url: http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050320/abb7106c/attachment.cpp 



More information about the scribus mailing list