Discussion:
[poppler] About the problem of fonts
兼安勉
2014-01-15 06:06:45 UTC
Permalink
Hello,

I worry about the problem of fonts by using "pdftoppm" command below.
--
pdftoppm -png TEST4.pdf OUT
--
TEST4.pdf is an attachment PDF(non-embedded font) file, and
is written by MS Gothic.
A image of output is OUT.jpg.
The problem of fonts is position gap of the alphabet.

How should it solve?

My environment is Ubuntu-ja-13.10-desktop-amd64.
The font setting is the following.
--
fc-match :lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match serif:lang=ja -> ipamp.ttf "IPAPMincho" "Regular"
fc-match sans-serif:lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match monospace:lang=ja -> ipag.ttf "IPAGothic" "Regular"
--

Best Regards,
Tsutomu Kaneyasu.
suzuki toshiya
2014-01-15 06:15:39 UTC
Permalink
Hi,

Unfortunately, there is no stable solution.

1) Running pdftoppm on Windows (or Mac OS X) system where
the official copy of MS Gothic (or MS Mincho) are accessible
by pdftoppm.

2) Installing some fonts with MS Gothic or MS Mincho compatible
metrics, like, Mona fonts.

# But I don't know the alphabet metrics are either tuned to
# be compatible. I think the tuned metrics of such fonts are
# mainly Katakana, Hiragana etc.

3) Remaking PDF with embedded fonts.

Regards,
mpsuzuki
Post by 兼安勉
Hello,
I worry about the problem of fonts by using "pdftoppm" command below.
--
pdftoppm -png TEST4.pdf OUT
--
TEST4.pdf is an attachment PDF(non-embedded font) file, and
is written by MS Gothic.
A image of output is OUT.jpg.
The problem of fonts is position gap of the alphabet.
How should it solve?
My environment is Ubuntu-ja-13.10-desktop-amd64.
The font setting is the following.
--
fc-match :lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match serif:lang=ja -> ipamp.ttf "IPAPMincho" "Regular"
fc-match sans-serif:lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match monospace:lang=ja -> ipag.ttf "IPAGothic" "Regular"
--
Best Regards,
Tsutomu Kaneyasu.
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
poppler mailing list
http://lists.freedesktop.org/mailman/listinfo/poppler
Adrian Perez de Castro
2014-01-15 13:22:00 UTC
Permalink
Post by suzuki toshiya
2) Installing some fonts with MS Gothic or MS Mincho compatible
metrics, like, Mona fonts.
# But I don't know the alphabet metrics are either tuned to
# be compatible. I think the tuned metrics of such fonts are
# mainly Katakana, Hiragana etc.
If you go with this solution, also make sure that there is a FontConfig
configuration file that sets up the fonts as possible replacements for
MS Gothic and MS Mincho. If you install the fonts using packages from
your distribution, this is probably already taken care of. If you need
to do it manually, the files are in “/etc/fonts/conf.d/”, and write
something like the following in a .conf file there:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="family" compare="contains">
<string>MS Gothic</string>
</test>
<edit name="family" mode="prepend">
<string>VL PGothic</string>
</edit>
</match>
</fontconfig>

This example replaces “MS Gothic” with “VL PGothic” -- just feel free to
write the name of the font that works better for replacing MS Gothic in
your case.

You can also do the replacements depending on the language. For info on
all the things that can be done with FontConfig, you may want to check
the documentation for the configuration files at:

http://www.freedesktop.org/software/fontconfig/fontconfig-user.html

Hope this helps!

-Adrian
Post by suzuki toshiya
Post by 兼安勉
Hello,
I worry about the problem of fonts by using "pdftoppm" command below.
--
pdftoppm -png TEST4.pdf OUT
--
TEST4.pdf is an attachment PDF(non-embedded font) file, and
is written by MS Gothic.
A image of output is OUT.jpg.
The problem of fonts is position gap of the alphabet.
How should it solve?
My environment is Ubuntu-ja-13.10-desktop-amd64.
The font setting is the following.
--
fc-match :lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match serif:lang=ja -> ipamp.ttf "IPAPMincho" "Regular"
fc-match sans-serif:lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match monospace:lang=ja -> ipag.ttf "IPAGothic" "Regular"
--
suzuki toshiya
2014-01-15 15:01:32 UTC
Permalink
Dear Adrian,

Oh, I slipped to remember about the font substitution control.
Thank you very much for helpful followup!

Regards,
mpsuzuki
Post by Adrian Perez de Castro
Post by suzuki toshiya
2) Installing some fonts with MS Gothic or MS Mincho compatible
metrics, like, Mona fonts.
# But I don't know the alphabet metrics are either tuned to
# be compatible. I think the tuned metrics of such fonts are
# mainly Katakana, Hiragana etc.
If you go with this solution, also make sure that there is a FontConfig
configuration file that sets up the fonts as possible replacements for
MS Gothic and MS Mincho. If you install the fonts using packages from
your distribution, this is probably already taken care of. If you need
to do it manually, the files are in $B!H(B/etc/fonts/conf.d/$B!I(B, and write
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="family" compare="contains">
<string>MS Gothic</string>
</test>
<edit name="family" mode="prepend">
<string>VL PGothic</string>
</edit>
</match>
</fontconfig>
This example replaces $B!H(BMS Gothic$B!I(B with $B!H(BVL PGothic$B!I(B -- just feel free to
write the name of the font that works better for replacing MS Gothic in
your case.
You can also do the replacements depending on the language. For info on
all the things that can be done with FontConfig, you may want to check
http://www.freedesktop.org/software/fontconfig/fontconfig-user.html
Hope this helps!
-Adrian
Post by suzuki toshiya
Post by 兼安勉
Hello,
I worry about the problem of fonts by using "pdftoppm" command below.
--
pdftoppm -png TEST4.pdf OUT
--
TEST4.pdf is an attachment PDF(non-embedded font) file, and
is written by MS Gothic.
A image of output is OUT.jpg.
The problem of fonts is position gap of the alphabet.
How should it solve?
My environment is Ubuntu-ja-13.10-desktop-amd64.
The font setting is the following.
--
fc-match :lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match serif:lang=ja -> ipamp.ttf "IPAPMincho" "Regular"
fc-match sans-serif:lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match monospace:lang=ja -> ipag.ttf "IPAGothic" "Regular"
--
兼安勉
2014-01-17 14:26:04 UTC
Permalink
Hello,

Thank you for your reply.
I considered the following solution.

The "FontName" and "BaseFont" are
---
/#82l#82r#20#82o#83S#83V#83b#83N -> MS PGothic
/#82l#82r#20#83S#83V#83b#83N -> MS Gothic
/#82l#82r#20#82o#96#BE#92#A9 -> MS PMincho
/#82l#82r#20#96#BE#92#A9 -> MS Mincho
---
But I think poppler can't extract,
and the fontconfig extract as a unkown font.

So It solved by temporary change like
---
/MS#20PGothic
/MS#20Gothic
/MS#20PMincho
/MS#20Mincho
---

Best Regards,
Tsutomu Kaneyasu.
Post by suzuki toshiya
Dear Adrian,
Oh, I slipped to remember about the font substitution control.
Thank you very much for helpful followup!
Regards,
mpsuzuki
Post by Adrian Perez de Castro
Post by suzuki toshiya
2) Installing some fonts with MS Gothic or MS Mincho compatible
metrics, like, Mona fonts.
# But I don't know the alphabet metrics are either tuned to
# be compatible. I think the tuned metrics of such fonts are
# mainly Katakana, Hiragana etc.
If you go with this solution, also make sure that there is a FontConfig
configuration file that sets up the fonts as possible replacements for
MS Gothic and MS Mincho. If you install the fonts using packages from
your distribution, this is probably already taken care of. If you need
to do it manually, the files are in $B!H(B/etc/fonts/conf.d/$B!I(B, and write
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="family" compare="contains">
<string>MS Gothic</string>
</test>
<edit name="family" mode="prepend">
<string>VL PGothic</string>
</edit>
</match>
</fontconfig>
This example replaces $B!H(BMS Gothic$B!I(B with $B!H(BVL PGothic$B!I(B -- just feel free to
write the name of the font that works better for replacing MS Gothic in
your case.
You can also do the replacements depending on the language. For info on
all the things that can be done with FontConfig, you may want to check
http://www.freedesktop.org/software/fontconfig/fontconfig-user.html
Hope this helps!
-Adrian
Post by suzuki toshiya
Post by 兼安勉
Hello,
I worry about the problem of fonts by using "pdftoppm" command below.
--
pdftoppm -png TEST4.pdf OUT
--
TEST4.pdf is an attachment PDF(non-embedded font) file, and
is written by MS Gothic.
A image of output is OUT.jpg.
The problem of fonts is position gap of the alphabet.
How should it solve?
My environment is Ubuntu-ja-13.10-desktop-amd64.
The font setting is the following.
--
fc-match :lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match serif:lang=ja -> ipamp.ttf "IPAPMincho" "Regular"
fc-match sans-serif:lang=ja -> ipagp.ttf "IPAPGothic" "Regular"
fc-match monospace:lang=ja -> ipag.ttf "IPAGothic" "Regular"
--
Loading...