Use Arial font in fo.ftl?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Use Arial font in fo.ftl?

James McGill-5
This is a question on using Barcode4J and XSL-FO in OFBiz.

Is it possible to use the "Arial" font in fo.ftl, and if so, how?
Before I try to convince my client that Helvetica is the same font as Arial
(which it isn't),
I want to be sure about what is possible.  Is it just a matter of making
fonts visible to the
Java runtime somehow?


This does not work:

                <fo:block text-align="center" font-family="Arial"
font-size="10pt" font-weight="bold">
                        ${mytexthere}
                </fo:block>


Likewise in my Barcode4J stanza, I have this, which does work -- but I'm not
sure whether it's substituting.

                    <barcode:barcode xmlns:barcode="
http://barcode4j.krysalis.org/ns" message="${inventoryItemId}">
                        <barcode:code128>
                            <barcode:height>20mm</barcode:height>

<barcode:module-width>0.375mm</barcode:module-width>
                            <barcode:human-readable>

<barcode:placement>bottom</barcode:placement>
                                      <font-name>Arial</font-name>
                                       <font-size>10pt</font-size>

<display-start-stop>false</display-start-stop>

<display-checksum>false</display-checksum>
                               </barcode:human-readable>
                        </barcode:code128>
                    </barcode:barcode>



--
James McGill
Phoenix AZ
Reply | Threaded
Open this post in threaded view
|

Re: Use Arial font in fo.ftl?

Brajesh Patel-2
Hello James,

Yes, you can use Arial font  in  fo.ftl  need to  use file
"framework/webapp/config/fop.xconf" ,  this file contain following code
that responsible for font family, change font family according to the
requirement:

        <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
          <font-triplet name="Arial" style="normal" weight="normal"/>
          <font-triplet name="ArialMT" style="normal" weight="normal"/>
        </font>


Thanks
Brajesh Patel




James McGill wrote:

> This is a question on using Barcode4J and XSL-FO in OFBiz.
>
> Is it possible to use the "Arial" font in fo.ftl, and if so, how?
> Before I try to convince my client that Helvetica is the same font as Arial
> (which it isn't),
> I want to be sure about what is possible.  Is it just a matter of making
> fonts visible to the
> Java runtime somehow?
>
>
> This does not work:
>
>                 <fo:block text-align="center" font-family="Arial"
> font-size="10pt" font-weight="bold">
>                         ${mytexthere}
>                 </fo:block>
>
>
> Likewise in my Barcode4J stanza, I have this, which does work -- but I'm not
> sure whether it's substituting.
>
>                     <barcode:barcode xmlns:barcode="
> http://barcode4j.krysalis.org/ns" message="${inventoryItemId}">
>                         <barcode:code128>
>                             <barcode:height>20mm</barcode:height>
>
> <barcode:module-width>0.375mm</barcode:module-width>
>                             <barcode:human-readable>
>
> <barcode:placement>bottom</barcode:placement>
>                                       <font-name>Arial</font-name>
>                                        <font-size>10pt</font-size>
>
> <display-start-stop>false</display-start-stop>
>
> <display-checksum>false</display-checksum>
>                                </barcode:human-readable>
>                         </barcode:code128>
>                     </barcode:barcode>
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: Use Arial font in fo.ftl?

James McGill-5
On Thu, Dec 17, 2009 at 12:21 AM, Brajesh Patel <
[hidden email]> wrote:

> Hello James,
>
> Yes, you can use Arial font  in  fo.ftl  need to  use file
> "framework/webapp/config/fop.xconf"
>

Thank you Brajesh!

--James
Reply | Threaded
Open this post in threaded view
|

Re: Use Arial font in fo.ftl?

James McGill-5
In reply to this post by Brajesh Patel-2
On Thu, Dec 17, 2009 at 12:21 AM, Brajesh Patel <
[hidden email]> wrote:

> Hello James,
>
> Yes, you can use Arial font  in  fo.ftl  need to  use file
> "framework/webapp/config/fop.xconf" ,  this file contain following code that
> responsible for font family, change font family according to the
> requirement:
>
>       <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
>         <font-triplet name="Arial" style="normal" weight="normal"/>
>         <font-triplet name="ArialMT" style="normal" weight="normal"/>
>       </font>
>
>


I found that I could put this:
<fonts>
         <auto-detect/>
</fonts>

And FOP now sees all the TTF's that the system knows.

Thanks again.
Reply | Threaded
Open this post in threaded view
|

Re: Use Arial font in fo.ftl?

Jacques Le Roux
Administrator
I will put that in FAQ

Thanks James

Jacques

From: "James McGill" <[hidden email]>

> On Thu, Dec 17, 2009 at 12:21 AM, Brajesh Patel <
> [hidden email]> wrote:
>
>> Hello James,
>>
>> Yes, you can use Arial font  in  fo.ftl  need to  use file
>> "framework/webapp/config/fop.xconf" ,  this file contain following code that
>> responsible for font family, change font family according to the
>> requirement:
>>
>>       <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
>>         <font-triplet name="Arial" style="normal" weight="normal"/>
>>         <font-triplet name="ArialMT" style="normal" weight="normal"/>
>>       </font>
>>
>>
>
>
> I found that I could put this:
> <fonts>
>         <auto-detect/>
> </fonts>
>
> And FOP now sees all the TTF's that the system knows.
>
> Thanks again.
>

Reply | Threaded
Open this post in threaded view
|

Re: Use Arial font in fo.ftl?

Jacques Le Roux
Administrator
Done,

Jacques


From: "Jacques Le Roux" <[hidden email]>

>I will put that in FAQ
>
> Thanks James
>
> Jacques
>
> From: "James McGill" <[hidden email]>
>> On Thu, Dec 17, 2009 at 12:21 AM, Brajesh Patel <
>> [hidden email]> wrote:
>>
>>> Hello James,
>>>
>>> Yes, you can use Arial font  in  fo.ftl  need to  use file
>>> "framework/webapp/config/fop.xconf" ,  this file contain following code that
>>> responsible for font family, change font family according to the
>>> requirement:
>>>
>>>       <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
>>>         <font-triplet name="Arial" style="normal" weight="normal"/>
>>>         <font-triplet name="ArialMT" style="normal" weight="normal"/>
>>>       </font>
>>>
>>>
>>
>>
>> I found that I could put this:
>> <fonts>
>>         <auto-detect/>
>> </fonts>
>>
>> And FOP now sees all the TTF's that the system knows.
>>
>> Thanks again.
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Use Arial font in fo.ftl?

Jacques Le Roux
Administrator
I have also added a tip about search in wiki

http://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-OFBizWikiSearch

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Done,
>
> Jacques
>
>
> From: "Jacques Le Roux" <[hidden email]>
>>I will put that in FAQ
>>
>> Thanks James
>>
>> Jacques
>>
>> From: "James McGill" <[hidden email]>
>>> On Thu, Dec 17, 2009 at 12:21 AM, Brajesh Patel <
>>> [hidden email]> wrote:
>>>
>>>> Hello James,
>>>>
>>>> Yes, you can use Arial font  in  fo.ftl  need to  use file
>>>> "framework/webapp/config/fop.xconf" ,  this file contain following code that
>>>> responsible for font family, change font family according to the
>>>> requirement:
>>>>
>>>>       <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
>>>>         <font-triplet name="Arial" style="normal" weight="normal"/>
>>>>         <font-triplet name="ArialMT" style="normal" weight="normal"/>
>>>>       </font>
>>>>
>>>>
>>>
>>>
>>> I found that I could put this:
>>> <fonts>
>>>         <auto-detect/>
>>> </fonts>
>>>
>>> And FOP now sees all the TTF's that the system knows.
>>>
>>> Thanks again.
>>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Use Arial font in fo.ftl?

Brajesh Patel-2
In reply to this post by Jacques Le Roux
Thanks James to share this.
and thanks Jacques  to add this information on the wiki(FAQ).

Brajesh Patel


Jacques Le Roux wrote:

> Done,
>
> Jacques
>
>
> From: "Jacques Le Roux" <[hidden email]>
>> I will put that in FAQ
>>
>> Thanks James
>>
>> Jacques
>>
>> From: "James McGill" <[hidden email]>
>>> On Thu, Dec 17, 2009 at 12:21 AM, Brajesh Patel <
>>> [hidden email]> wrote:
>>>
>>>> Hello James,
>>>>
>>>> Yes, you can use Arial font  in  fo.ftl  need to  use file
>>>> "framework/webapp/config/fop.xconf" ,  this file contain following
>>>> code that
>>>> responsible for font family, change font family according to the
>>>> requirement:
>>>>
>>>>       <font metrics-url="arial.xml" kerning="yes"
>>>> embed-url="arial.ttf">
>>>>         <font-triplet name="Arial" style="normal" weight="normal"/>
>>>>         <font-triplet name="ArialMT" style="normal" weight="normal"/>
>>>>       </font>
>>>>
>>>>
>>>
>>>
>>> I found that I could put this:
>>> <fonts>
>>>         <auto-detect/>
>>> </fonts>
>>>
>>> And FOP now sees all the TTF's that the system knows.
>>>
>>> Thanks again.
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Use Arial font in fo.ftl?

Jacques Le Roux
Administrator
In reply to this post by Jacques Le Roux
I have updated the tips about search in archives (Nabble and Marlkmail) at
http://cwiki.apache.org/confluence/display/OFBADMIN/Mailing+Lists to use the new Nabble forums instead
I also tried to update the Firefox search plugins to use the new Nabble forums, without success so far. They still point to old
Nabble forums, though I changed the URLs. Perhaps because the Firefox search plugins format has changed?
I put the attachment at http://cwiki.apache.org/confluence/pages/viewpageattachments.action?pageId=6553738

Jacques

From: "Jacques Le Roux" <[hidden email]>

>I have also added a tip about search in wiki
>
> http://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-OFBizWikiSearch
>
> Jacques
>
> From: "Jacques Le Roux" <[hidden email]>
>> Done,
>>
>> Jacques
>>
>>
>> From: "Jacques Le Roux" <[hidden email]>
>>>I will put that in FAQ
>>>
>>> Thanks James
>>>
>>> Jacques
>>>
>>> From: "James McGill" <[hidden email]>
>>>> On Thu, Dec 17, 2009 at 12:21 AM, Brajesh Patel <
>>>> [hidden email]> wrote:
>>>>
>>>>> Hello James,
>>>>>
>>>>> Yes, you can use Arial font  in  fo.ftl  need to  use file
>>>>> "framework/webapp/config/fop.xconf" ,  this file contain following code that
>>>>> responsible for font family, change font family according to the
>>>>> requirement:
>>>>>
>>>>>       <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
>>>>>         <font-triplet name="Arial" style="normal" weight="normal"/>
>>>>>         <font-triplet name="ArialMT" style="normal" weight="normal"/>
>>>>>       </font>
>>>>>
>>>>>
>>>>
>>>>
>>>> I found that I could put this:
>>>> <fonts>
>>>>         <auto-detect/>
>>>> </fonts>
>>>>
>>>> And FOP now sees all the TTF's that the system knows.
>>>>
>>>> Thanks again.
>>>>
>>>
>>
>
>