You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Tobias Fischer | pagina GmbH <to...@pagina.gmbh> on 2017/04/13 16:42:26 UTC
How to create a Java FontDescriptor from font file?
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: tobias.fischer@pagina.gmbh
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
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: How to create a Java FontDescriptor from font file?
Posted by Simon Steiner <si...@gmail.com>.
Hi,
See OFFontLoader.java
Thanks
-----Original Message-----
From: Tobias Fischer | pagina GmbH [mailto:tobias.fischer@pagina.gmbh]
Sent: 13 April 2017 17:42
To: fop-users@xmlgraphics.apache.org
Subject: How to create a Java FontDescriptor from font file?
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: tobias.fischer@pagina.gmbh
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
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org