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 Puja <pu...@gmail.com> on 2014/10/20 13:11:13 UTC

FOP alignment problem between two font type

<http://apache-fop.1065347.n5.nabble.com/file/n41322/FOP_AlignmentProblem.png>
Hi,

I am using FOP 1.0 version for converting reports in PDF. Problem I am
facing is alignment between two font type. I am using
Font-Family="Halvetica,Symbol"

My xml requirement is to display greek omega sign as a unit for impedance.As
per my understanding as omega is not present in Halvetica, font used to
diplay omega is Symbol but alignment for both font type does not match. I
tried display-align, text-align, vertical-align but it doesn't work. Below
is section from my fo file, please suggest how to correct the alignment. I
have attached current alignment screen shot as well.

<fo:table-cell number-columns-spanned="2" text-align="right">
   <fo:block>
     <fo:inline>
          <fo:inline>747</fo:inline>
    </fo:inline>
    <fo:inline space-start="5px">Ω</fo:inline>
   </fo:block>
</fo:table-cell>





--
View this message in context: http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322.html
Sent from the FOP - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP alignment problem between two font type

Posted by Pascal Sancho <ps...@gmail.com>.
Font char box seem different, and baselines are not correctly aligned

As a workaround, you can use this:
<fo:block>747 <fo:inline alignment-adjust="0.3em">Ω</fo:inline></fo:block>

2014-10-20 13:11 GMT+02:00 Puja <pu...@gmail.com>:
> <http://apache-fop.1065347.n5.nabble.com/file/n41322/FOP_AlignmentProblem.png>
> Hi,
>
> I am using FOP 1.0 version for converting reports in PDF. Problem I am
> facing is alignment between two font type. I am using
> Font-Family="Halvetica,Symbol"
>
> My xml requirement is to display greek omega sign as a unit for impedance.As
> per my understanding as omega is not present in Halvetica, font used to
> diplay omega is Symbol but alignment for both font type does not match. I
> tried display-align, text-align, vertical-align but it doesn't work. Below
> is section from my fo file, please suggest how to correct the alignment. I
> have attached current alignment screen shot as well.
>
> <fo:table-cell number-columns-spanned="2" text-align="right">
>    <fo:block>
>      <fo:inline>
>           <fo:inline>747</fo:inline>
>     </fo:inline>
>     <fo:inline space-start="5px">Ω</fo:inline>
>    </fo:block>
> </fo:table-cell>
>
>
>
>
>
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



-- 
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP alignment problem between two font type

Posted by Glenn Adams <gl...@skynav.com>.
On Tue, Mar 8, 2016 at 10:00 PM, gkaplan <gk...@kaplansoftware.com> wrote:

> I tried to use Arial Unicode MS but FOP complains that it is not found.
> I’m assuming it is not one of the built-in fonts.
>
> 1.       Do I need to configure FOP to use a custom font and then include
> it somewhere?
>
yes, see [1][2]

[1] https://xmlgraphics.apache.org/fop/2.1/configuration.html
[2] https://xmlgraphics.apache.org/fop/2.1/fonts.html

> 2.       If I do use a custom font, will it have to reside on everyone
> else’s machine, or will it reside inside the PDF so that it renders
> properly everywhere else?
>
by default, the used subset will be be embedded in the PDF, so it does not
have to be present (externally) when rendering the PDF

>
>
> Thanks
>
>
>
> *From:* Glenn Adams-2 [via Apache FOP] [mailto:ml-node+[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=43653&i=0>]
> *Sent:* Tuesday, March 08, 2016 11:45 PM
> *To:* Gerry Kaplan <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=43653&i=1>>
> *Subject:* Re: FOP alignment problem between two font type
>
>
>
>
>
>
>
> On Tue, Mar 8, 2016 at 6:53 PM, Puja <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=43652&i=0>> wrote:
>
> I faced such issue with sigma character, I couldn't find worthwhile
> solution. Ended up using image of sigma character.
>
> On Mar 8, 2016 19:40, "gkaplan [via Apache FOP]" <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=43651&i=0>> wrote:
>
> I am using XSL to create the FOP markup, so it is not possible for me to
> easily wrap special characters in their own inline block. I am using the
> greater-than-or-equals ≥ symbol which is only available in the Symbol font.
> The rest of the document is in sans-serif.
>
> What's odd is that any numbers subsequent to the ≥ symbol are also in the
> Symbol font.
>
> My markup includes an attribute-set as follows:
>
>         <xsl:attribute-set name="normal">
>                 <xsl:attribute name="font-size"><xsl:value-of
> select="$fontSize"/></xsl:attribute>
>                 <xsl:attribute name="font-family">sans-serif,
> Symbol</xsl:attribute>
>         </xsl:attribute-set>
>
> But when the PDF is generated, the baseline (or some other attribute) of
> the ≥ symbol is much lower.
>
> Arial Unicode MS
>
> Noto Sans
>
> etc.
>
>
>
> Is there really no way to fix this? I've tried tinkering with setting
> baselines, etc. but nothing fixes this. Also, as the previous solution
> mentions, I don't know of any fonts that include this symbol as well as the
> full alphabet.
>
> Thanks in advance for any help.
> ------------------------------
>
> *If you reply to this email, your message will be added to the discussion
> below:*
>
>
> http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43650.html
>
> To unsubscribe from FOP alignment problem between two font type, click
> here.
> 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: Re: FOP alignment problem between two font
> type
> <http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43651.html>
> Sent from the FOP - Users mailing list archive
> <http://apache-fop.1065347.n5.nabble.com/FOP-Users-f3.html> at Nabble.com.
>
>
>
>
> ------------------------------
>
> *If you reply to this email, your message will be added to the discussion
> below:*
>
>
> http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43652.html
>
> To unsubscribe from FOP alignment problem between two font type, click
> here.
> 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: RE: FOP alignment problem between two font
> type
> <http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43653.html>
>
> Sent from the FOP - Users mailing list archive
> <http://apache-fop.1065347.n5.nabble.com/FOP-Users-f3.html> at Nabble.com.
>

RE: FOP alignment problem between two font type

Posted by gkaplan <gk...@kaplansoftware.com>.
I tried to use Arial Unicode MS but FOP complains that it is not found. I’m assuming it is not one of the built-in fonts.

1.       Do I need to configure FOP to use a custom font and then include it somewhere?

2.       If I do use a custom font, will it have to reside on everyone else’s machine, or will it reside inside the PDF so that it renders properly everywhere else?

Thanks

From: Glenn Adams-2 [via Apache FOP] [mailto:ml-node+s1065347n43652h1@n5.nabble.com]
Sent: Tuesday, March 08, 2016 11:45 PM
To: Gerry Kaplan <gk...@kaplansoftware.com>
Subject: Re: FOP alignment problem between two font type



On Tue, Mar 8, 2016 at 6:53 PM, Puja <[hidden email]</user/SendEmail.jtp?type=node&node=43652&i=0>> wrote:

I faced such issue with sigma character, I couldn't find worthwhile solution. Ended up using image of sigma character.
On Mar 8, 2016 19:40, "gkaplan [via Apache FOP]" <[hidden email]<http://user/SendEmail.jtp?type=node&node=43651&i=0>> wrote:
I am using XSL to create the FOP markup, so it is not possible for me to easily wrap special characters in their own inline block. I am using the greater-than-or-equals ≥ symbol which is only available in the Symbol font. The rest of the document is in sans-serif.

What's odd is that any numbers subsequent to the ≥ symbol are also in the Symbol font.

My markup includes an attribute-set as follows:

        <xsl:attribute-set name="normal">
                <xsl:attribute name="font-size"><xsl:value-of select="$fontSize"/></xsl:attribute>
                <xsl:attribute name="font-family">sans-serif, Symbol</xsl:attribute>
        </xsl:attribute-set>

But when the PDF is generated, the baseline (or some other attribute) of the ≥ symbol is much lower.
Arial Unicode MS
Noto Sans
etc.


Is there really no way to fix this? I've tried tinkering with setting baselines, etc. but nothing fixes this. Also, as the previous solution mentions, I don't know of any fonts that include this symbol as well as the full alphabet.

Thanks in advance for any help.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43650.html
To unsubscribe from FOP alignment problem between two font type, click here.
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: Re: FOP alignment problem between two font type<http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43651.html>
Sent from the FOP - Users mailing list archive<http://apache-fop.1065347.n5.nabble.com/FOP-Users-f3.html> at Nabble.com.


________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43652.html
To unsubscribe from FOP alignment problem between two font type, click here<http://apache-fop.1065347.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=41322&code=Z2thcGxhbkBrYXBsYW5zb2Z0d2FyZS5jb218NDEzMjJ8NjY0OTczNDQ5>.
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/FOP-alignment-problem-between-two-font-type-tp41322p43653.html
Sent from the FOP - Users mailing list archive at Nabble.com.

Re: FOP alignment problem between two font type

Posted by "Andreas L. Delmelle" <an...@telenet.be>.
Indeed... Also note that the issue as described ONLY affects the Base14 (built-in) Symbol font, so another way to address this would be to make sure to use the TrueType Symbol font, if available, in which case the font-selection would also produce the intended result with two different fonts. 
KR 
  
Andreas 

----- Original Message -----

> On Tue, Mar 8, 2016 at 6:53 PM, Puja < pujaagr35@gmail.com > wrote:

> > I faced such issue with sigma character, I couldn't find worthwhile
> > solution.
> > Ended up using image of sigma character.
> 
> > On Mar 8, 2016 19:40, "gkaplan [via Apache FOP]" < [hidden email] > wrote:
> 

> > > I am using XSL to create the FOP markup, so it is not possible for me to
> > > easily wrap special characters in their own inline block. I am using the
> > > greater-than-or-equals ≥ symbol which is only available in the Symbol
> > > font.
> > > The rest of the document is in sans-serif.
> > 
> 

> > > What's odd is that any numbers subsequent to the ≥ symbol are also in the
> > > Symbol font.
> > 
> 

> > > My markup includes an attribute-set as follows:
> > 
> 

> > >         <xsl:attribute-set name="normal">
> > 
> 
> > >                 <xsl:attribute name="font-size"><xsl:value-of
> > > select="$fontSize"/></xsl:attribute>
> > 
> 
> > >                 <xsl:attribute name="font-family">sans-serif,
> > > Symbol</xsl:attribute>
> > 
> 
> > >         </xsl:attribute-set>
> > 
> 

> > > But when the PDF is generated, the baseline (or some other attribute) of
> > > the
> > > ≥ symbol is much lower.
> > 
> 
> Arial Unicode MS
> Noto Sans
> etc. 

> > > Is there really no way to fix this? I've tried tinkering with setting
> > > baselines, etc. but nothing fixes this. Also, as the previous solution
> > > mentions, I don't know of any fonts that include this symbol as well as
> > > the
> > > full alphabet.
> > 
> 

> > > Thanks in advance for any help.
> > 
> 

> > > If you reply to this email, your message will be added to the discussion
> > > below:
> > 
> 
> > > http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43650.html
> > 
> 
> > > To unsubscribe from FOP alignment problem between two font type, click
> > > here
> > > .
> > 
> 
> > > NAML
> > 
> 

> > View this message in context: Re: FOP alignment problem between two font
> > type
> 
> > Sent from the FOP - Users mailing list archive at Nabble.com.
> 

Re: FOP alignment problem between two font type

Posted by Glenn Adams <gl...@skynav.com>.
On Tue, Mar 8, 2016 at 6:53 PM, Puja <pu...@gmail.com> wrote:

> I faced such issue with sigma character, I couldn't find worthwhile
> solution. Ended up using image of sigma character.
> On Mar 8, 2016 19:40, "gkaplan [via Apache FOP]" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=43651&i=0>> wrote:
>
>> I am using XSL to create the FOP markup, so it is not possible for me to
>> easily wrap special characters in their own inline block. I am using the
>> greater-than-or-equals ≥ symbol which is only available in the Symbol font.
>> The rest of the document is in sans-serif.
>>
>> What's odd is that any numbers subsequent to the ≥ symbol are also in the
>> Symbol font.
>>
>> My markup includes an attribute-set as follows:
>>
>>         <xsl:attribute-set name="normal">
>>                 <xsl:attribute name="font-size"><xsl:value-of
>> select="$fontSize"/></xsl:attribute>
>>                 <xsl:attribute name="font-family">sans-serif,
>> Symbol</xsl:attribute>
>>         </xsl:attribute-set>
>>
>> But when the PDF is generated, the baseline (or some other attribute) of
>> the ≥ symbol is much lower.
>
> Arial Unicode MS
Noto Sans
etc.

>
>>
>> Is there really no way to fix this? I've tried tinkering with setting
>> baselines, etc. but nothing fixes this. Also, as the previous solution
>> mentions, I don't know of any fonts that include this symbol as well as the
>> full alphabet.
>>
>> Thanks in advance for any help.
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43650.html
>> To unsubscribe from FOP alignment problem between two font type, click
>> here.
>> 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: Re: FOP alignment problem between two font
> type
> <http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43651.html>
> Sent from the FOP - Users mailing list archive
> <http://apache-fop.1065347.n5.nabble.com/FOP-Users-f3.html> at Nabble.com.
>

Re: FOP alignment problem between two font type

Posted by Puja <pu...@gmail.com>.
I faced such issue with sigma character, I couldn't find worthwhile
solution. Ended up using image of sigma character.
On Mar 8, 2016 19:40, "gkaplan [via Apache FOP]" <
ml-node+s1065347n43650h6@n5.nabble.com> wrote:

> I am using XSL to create the FOP markup, so it is not possible for me to
> easily wrap special characters in their own inline block. I am using the
> greater-than-or-equals ≥ symbol which is only available in the Symbol font.
> The rest of the document is in sans-serif.
>
> What's odd is that any numbers subsequent to the ≥ symbol are also in the
> Symbol font.
>
> My markup includes an attribute-set as follows:
>
>         <xsl:attribute-set name="normal">
>                 <xsl:attribute name="font-size"><xsl:value-of
> select="$fontSize"/></xsl:attribute>
>                 <xsl:attribute name="font-family">sans-serif,
> Symbol</xsl:attribute>
>         </xsl:attribute-set>
>
> But when the PDF is generated, the baseline (or some other attribute) of
> the ≥ symbol is much lower.
>
> Is there really no way to fix this? I've tried tinkering with setting
> baselines, etc. but nothing fixes this. Also, as the previous solution
> mentions, I don't know of any fonts that include this symbol as well as the
> full alphabet.
>
> Thanks in advance for any help.
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43650.html
> To unsubscribe from FOP alignment problem between two font type, click
> here
> <http://apache-fop.1065347.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=41322&code=cHVqYWFncjM1QGdtYWlsLmNvbXw0MTMyMnwtNDQzMzMzNDQ3>
> .
> 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/FOP-alignment-problem-between-two-font-type-tp41322p43651.html
Sent from the FOP - Users mailing list archive at Nabble.com.

Re: FOP alignment problem between two font type

Posted by gkaplan <gk...@kaplansoftware.com>.
I am using XSL to create the FOP markup, so it is not possible for me to
easily wrap special characters in their own inline block. I am using the
greater-than-or-equals ≥ symbol which is only available in the Symbol font.
The rest of the document is in sans-serif. 

What's odd is that any numbers subsequent to the ≥ symbol are also in the
Symbol font.

My markup includes an attribute-set as follows:

	<xsl:attribute-set name="normal">
		<xsl:attribute name="font-size"><xsl:value-of
select="$fontSize"/></xsl:attribute>
		<xsl:attribute name="font-family">sans-serif, Symbol</xsl:attribute>
	</xsl:attribute-set>

But when the PDF is generated, the baseline (or some other attribute) of the
≥ symbol is much lower. 

Is there really no way to fix this? I've tried tinkering with setting
baselines, etc. but nothing fixes this. Also, as the previous solution
mentions, I don't know of any fonts that include this symbol as well as the
full alphabet.

Thanks in advance for any help.



--
View this message in context: http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322p43650.html
Sent from the FOP - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP alignment problem between two font type

Posted by Glenn Adams <gl...@skynav.com>.
use a single font that has glyphs for both characters

On Mon, Oct 20, 2014 at 5:11 AM, Puja <pu...@gmail.com> wrote:

> <
> http://apache-fop.1065347.n5.nabble.com/file/n41322/FOP_AlignmentProblem.png
> >
> Hi,
>
> I am using FOP 1.0 version for converting reports in PDF. Problem I am
> facing is alignment between two font type. I am using
> Font-Family="Halvetica,Symbol"
>
> My xml requirement is to display greek omega sign as a unit for
> impedance.As
> per my understanding as omega is not present in Halvetica, font used to
> diplay omega is Symbol but alignment for both font type does not match. I
> tried display-align, text-align, vertical-align but it doesn't work. Below
> is section from my fo file, please suggest how to correct the alignment. I
> have attached current alignment screen shot as well.
>
> <fo:table-cell number-columns-spanned="2" text-align="right">
>    <fo:block>
>      <fo:inline>
>           <fo:inline>747</fo:inline>
>     </fo:inline>
>     <fo:inline space-start="5px">Ω</fo:inline>
>    </fo:block>
> </fo:table-cell>
>
>
>
>
>
> --
> View this message in context:
> http://apache-fop.1065347.n5.nabble.com/FOP-alignment-problem-between-two-font-type-tp41322.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>