How to create a Java FontDescriptor from font file?

Tobias Fischer | pagina GmbH <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
Hi,

I'm trying to use the FOP font subsetting tools for TTF and OTF fonts 
outside of the FOP processor in a side project.
I know this is probably out of scope of this mailing list, but probably 
someone can help me anyways...

My problem at the moment is, that I just don't see how to construct a 
FontDesriptor from a system font file.

I mean, I found out how to read the font with a FontFileReader and also 
found out about the OTFSubSetFile and the TTFSubSetFile classes, but if 
I want to determine automagically whether to use the OTF or TTF class 
(as in [1]) I always get to the point where I need a FontDescriptor object.

And after some wasted hours of time digging through the FOP sources, I 
still haven't found a way to create this object directly from a source 
File/URI.

Any idea is appreciated!
Thank you very much!

Kind regards,
Tobias


[1] 
https://github.com/apache/fop/blob/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFFactory.java#L1360

-- 
Tobias Fischer
Senior Software Engineer
(XML/EPUB/PrintCSS)

Telefon: +49 (0)7071 9876-44 · Fax: -22
Mail: [email protected]

pagina GmbH - Publikationstechnologien
Herrenberger Straße 51 | D-72070 Tübingen
www.pagina.gmbh | www.parsx.de

Handelsregister Stuttgart - HRB 380249
Geschäftsführer: Tobias Ott
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.