xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amigo <et_s...@mail.ru>
Subject Re: Cyrrilic font in Apache FOP 1.1
Date Sun, 17 Nov 2013 12:59:22 GMT
Thanks Luis and Luca!

I make two mistake:
1. Load and set config file after create fop object.

This right order:
            FopFactory fopFactory = FopFactory.newInstance();
            DefaultConfigurationBuilder cfgBuilder = new
DefaultConfigurationBuilder();
            Configuration cfg = cfgBuilder.buildFromFile(new
File("/home/name/temp/fonts/userconfig.xml"));
            fopFactory.setUserConfig(cfg);

fopFactory.getFontManager().setFontBaseURL("/home/name/temp/fonts/");
            OutputStream out = new BufferedOutputStream(new
FileOutputStream(new File("/home/name/temp/myfile.pdf")));
            Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);


2. After fix this i set weight "bold" for arial and everything work.
Thanks all for help!


2013/11/17 Luca Bellonda [via Apache FOP] <
ml-node+s1065347n39608h54@n5.nabble.com>

> Hello, the error suggests that a bold font is required (700 is the weight).
>
> I think that an entry for the Arial bold is missing in the configuration
> file.
>
> weight="normal"  means a numeric value of 400
> weight="bold" means a numeric value of 700
>
>
>
> http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-weight
>
> http://xmlgraphics.apache.org/fop/1.1/fonts.html
>
>
> 2013/11/15 Amigo <[hidden email]<http://user/SendEmail.jtp?type=node&node=39608&i=0>
> >
>
>> I have trouble on using Apache FOP 1.1 with arial font on ubuntu.
>>
>> Configuration file fonts.xml:
>>
>>        <font-triplet name="Arial" style="normal" weight="normal" />
>>        <font-triplet name="ArialMT" style="normal" weight="normal" />
>>
>>
>> Font "Arial,normal,700" not found. Substituting with "any,normal,700".
>>
>> What should I fix in order to use Arial font?
>>
>>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-fop.1065347.n5.nabble.com/Cyrrilic-font-in-Apache-FOP-1-1-tp39595p39608.html
>  To unsubscribe from Cyrrilic font in Apache FOP 1.1, click here<http://apache-fop.1065347.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=39595&code=ZXRfc29mdEBtYWlsLnJ1fDM5NTk1fC04MTg5MDU3NTI=>
> .
> NAML<http://apache-fop.1065347.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-fop.1065347.n5.nabble.com/Cyrrilic-font-in-Apache-FOP-1-1-tp39595p39609.html
Sent from the FOP - Users mailing list archive at Nabble.com.
Mime
View raw message