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 Mildred <mi...@online.fr> on 2007/05/01 15:08:18 UTC
Mixing languages and Unicode
Hi,
I'm trying to create a document using XSL and FOP containing tibetan
prayers. And I'm having troubles with fonts.
At first, all my tibetan characters were represented by a #. I looked
at the fop website and I managed to create a configuration file, and to
create a metric for my tibetan font. And everywhere I can found tibetan
characters, i added the attribute font-family="Tibetan"
But when there are latin characters and tibetan characters mixed
together, it uses the tibetan font. But for the latin characters, the
tibetan font draws them with serif. and all other latin characters in
my document are sans-serif. So it doesn't look right.
I would rather like to specify in my document the latin font. And let
FOP use the tibetan font for tibetan characters (those characters can
only be found here, it should not be too difficult). Is it possible ?
I would like to say it works like that everywhere on my system. I use
the DejaVu font for almost everything and where there are tibetan
characters (in my text editor for example), the system fall back to the
only tibetan font it can find. I xould like FOP to do the same.
I hope you understood me. i can provide example if you ant.
Thank you
Mildred
PS: i sent twice the subscription email to the mailing list but i had
no response. So I'm using gmane.
--
Mildred <xm...@jabber.fr> <http://mildred632.free.fr/>
Clef GPG : <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Mixing languages and Unicode
Posted by Manuel Mall <mm...@arcus.com.au>.
On Tuesday 01 May 2007 21:08, Mildred wrote:
> Hi,
>
> I'm trying to create a document using XSL and FOP containing tibetan
> prayers. And I'm having troubles with fonts.
>
> At first, all my tibetan characters were represented by a #. I looked
> at the fop website and I managed to create a configuration file, and
> to create a metric for my tibetan font. And everywhere I can found
> tibetan characters, i added the attribute font-family="Tibetan"
>
> But when there are latin characters and tibetan characters mixed
> together, it uses the tibetan font. But for the latin characters, the
> tibetan font draws them with serif. and all other latin characters in
> my document are sans-serif. So it doesn't look right.
>
> I would rather like to specify in my document the latin font. And let
> FOP use the tibetan font for tibetan characters (those characters can
> only be found here, it should not be too difficult). Is it possible ?
>
> I would like to say it works like that everywhere on my system. I use
> the DejaVu font for almost everything and where there are tibetan
> characters (in my text editor for example), the system fall back to
> the only tibetan font it can find. I xould like FOP to do the same.
>
> I hope you understood me. i can provide example if you ant.
> Thank you
>
Mildred,
unfortunately FOP doesn't yet support the font selection as you would
like it. Assuming you are using the latest version of FOP (FOP 0.93 or
the current trunk version) I would try the following: Set DejaVu as the
default font, e.g. set it on the outermost fo:block or fo:flow. For any
sequence of tibetan characters surround them with an <fo:wrapper
font-family="tibetan">...</fo:wrapper> element. Obviously, if you have
more tibetan than latin in your text do it the other way around.
Manuel
> Mildred
>
> PS: i sent twice the subscription email to the mailing list but i had
> no response. So I'm using gmane.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Mixing languages and Unicode
Posted by Alexandros <al...@freemail.gr>.
Hello!
As others have noted fop doesn't yet support a character by character font
selection strategy.
Another way around this is to create a custom font containing all the glyphs you
need. This can be easily done using fontforge
(http://fontforge.sourceforge.net). Take the font you use for eg english and
copy into it the glyphs from the tibetan font. Then just use this new font
instead of the one you usually work with.
HTH,
Alexandros
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Mixing languages and Unicode
Posted by Mildred <mi...@online.fr>.
Thank you for the answers
> I believe the functionality you are looking for hasn't been
> implemented in FOP yet. In the future there will be provision for
> providing a comma separated list of fonts in the font-family
> attribute so if the first font cannot be used FOP will try to use the
> second one in the list and so forth.
>
> In the meantime, I think there might be a workaround for you by using
> fo:inline to explicitly use a different font for Tibetan characters..
>
> Example :-
>
> <fo:block font-family="Sans-serif">
> Blah blah<fo:inline font-family="Tibetan">#260</fo:inline>,
> blah </fo:block>
>
It is helpful but the problem is that my document is processed by XSLT
and I don't know how to generate those elements. Also, I can have
unrecognized characters everywhere. But it's not that important for the
moment, I think I'll wait until FOP implements it.
Mildred
--
Mildred <xm...@jabber.fr> <http://mildred632.free.fr/>
Clef GPG : <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Mixing languages and Unicode
Posted by Adrian Cumiskey <ad...@gmail.com>.
Hi Mildred,
See my reply below..
Mildred wrote:
> Hi,
>
> I'm trying to create a document using XSL and FOP containing tibetan
> prayers. And I'm having troubles with fonts.
>
> At first, all my tibetan characters were represented by a #. I looked
> at the fop website and I managed to create a configuration file, and to
> create a metric for my tibetan font. And everywhere I can found tibetan
> characters, i added the attribute font-family="Tibetan"
>
> But when there are latin characters and tibetan characters mixed
> together, it uses the tibetan font. But for the latin characters, the
> tibetan font draws them with serif. and all other latin characters in
> my document are sans-serif. So it doesn't look right.
>
> I would rather like to specify in my document the latin font. And let
> FOP use the tibetan font for tibetan characters (those characters can
> only be found here, it should not be too difficult). Is it possible ?
I believe the functionality you are looking for hasn't been implemented
in FOP yet. In the future there will be provision for providing a comma
separated list of fonts in the font-family attribute so if the first
font cannot be used FOP will try to use the second one in the list and
so forth.
In the meantime, I think there might be a workaround for you by using
fo:inline to explicitly use a different font for Tibetan characters..
Example :-
<fo:block font-family="Sans-serif">
Blah blah<fo:inline font-family="Tibetan">#260</fo:inline>, blah
</fo:block>
I hope that I have understood your question correctly and provided you
with an approach that may be of help to you.
Adrian.
>
> I would like to say it works like that everywhere on my system. I use
> the DejaVu font for almost everything and where there are tibetan
> characters (in my text editor for example), the system fall back to the
> only tibetan font it can find. I xould like FOP to do the same.
>
> I hope you understood me. i can provide example if you ant.
> Thank you
>
> Mildred
>
> PS: i sent twice the subscription email to the mailing list but i had
> no response. So I'm using gmane.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Mixing languages and Unicode
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hi Mildred,
in theory, you'd simply use font-family="Tibetan,sans-serif" and that
would be it. Unfortunately, FOP can't do per-character switching of
fonts, yet. At the moment, there's no way around specifying the right
font for each part of your document.
Concerning your mailing list subscription: Maybe it got swallowed at the
ASF or by your mail provider by a spam filter. I've heard that this can
happen from time to time.
On 01.05.2007 15:08:18 Mildred wrote:
> Hi,
>
> I'm trying to create a document using XSL and FOP containing tibetan
> prayers. And I'm having troubles with fonts.
>
> At first, all my tibetan characters were represented by a #. I looked
> at the fop website and I managed to create a configuration file, and to
> create a metric for my tibetan font. And everywhere I can found tibetan
> characters, i added the attribute font-family="Tibetan"
>
> But when there are latin characters and tibetan characters mixed
> together, it uses the tibetan font. But for the latin characters, the
> tibetan font draws them with serif. and all other latin characters in
> my document are sans-serif. So it doesn't look right.
>
> I would rather like to specify in my document the latin font. And let
> FOP use the tibetan font for tibetan characters (those characters can
> only be found here, it should not be too difficult). Is it possible ?
>
> I would like to say it works like that everywhere on my system. I use
> the DejaVu font for almost everything and where there are tibetan
> characters (in my text editor for example), the system fall back to the
> only tibetan font it can find. I xould like FOP to do the same.
>
> I hope you understood me. i can provide example if you ant.
> Thank you
>
> Mildred
>
> PS: i sent twice the subscription email to the mailing list but i had
> no response. So I'm using gmane.
>
> --
> Mildred <xm...@jabber.fr> <http://mildred632.free.fr/>
> Clef GPG : <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
> Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org