[dvipdfmx] choosing type1 vs. pk
Shunsaku Hirata
shunsaku.hirata74 at gmail.com
Sun Jun 20 06:49:37 CEST 2021
Hi Karl,
2021年6月20日(日) 6:12 Karl Berry <karl at freefriends.org>:
>
> Hi Shunsaku,
>
> The absence of font mapping definition does not mean that dvipdfmx
> uses PK fonts,
>
> This seems strange to me. Without a map line, a Type 1 font usually
> cannot be successfully used. Although ... maybe that is not true in the
> CJK world? Is it useful to always use Type 1 fonts there, even without
> map lines?
A map line is required when you want to use the font with encoding
different from its default (built-in) one or with options such as the
"slant" option applied to emulate an oblique font. Using Computer
Modern fonts usually doesn't require map lines.
Actually, pdftex.map for pdfTeX contains map lines like
cmr10 CMR10 <cmr10.pfb
which does not require a special treatment such as reencoding hence
it can be implicit.
> it means default settings (for the encoding and options) to be used
> for that font.
>
> By "default settings" do you mean something hardwired into the code
> ("use type1 if available"), or is there a way users can affect it?
> Other than by making .pfb files unavailable.
It is hardwired into the code and there is no way for users to affect it.
I think at the time when dvipdfm was first released, there were problems
in using bitmap fonts in PDF: terrible rendering in some PDF viewers,
unable to search text... Avoiding use of PK fonts was recommended
as much as possible. Probably this is the reason why there is no way
to switch to PK font easily.
> In dvips and pdftex, if there is no map line, it switches to pk:
>
> env TEXFONTMAPS=/none dvips hello.dvi
> This is dvips(k) 2021.1 Copyright 2021 Radical Eye Software (www.radicaleye.com)
> ...
> </usr/local/texlive/2021/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk>
> ...
> (hello.dvi is just tex \\relax hello \\end or equivalent.)
>
> This behavior is the same as the original dvipdfm (without "x") and
> can't be changed.
>
> The behavior could be changed for dvipdfmx while remaining the same for
> dvipdfm compatibility mode. It seems useful, in principle, to me for
> users to be able to control what format gets used.
Changing dvipdfmx behavior may not affect TeXLive users since for
TeX Live dvipdfmx reads font map files which basically contains
necessary font mappings for all Type 1 fonts available. However, for
other users, by this change dvipdfmx will suddenly start using PK
fonts instead of Type 1 versions.
I personally think having font files in several formats for the same
font at the same time is an unusual situation and I think that there
are not so many users who want to switch to PK fonts. However,
having an option to control the dvipdfmx behavior might be useful.
I will consider if it is possible to introduce an option to make dvipdfmx
behave like dvips when no map line is available.
Thanks,
Shunsaku Hirata
More information about the dvipdfmx
mailing list.