From: "Vasile Gaburici" <vgaburici@gmail.com>
To: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Hans Hagen <pragma@wxs.nl>, Taco Hoekwater <taco@elvenkind.com>
Subject: Re: Font problems with latest minimals on Linux
Date: Wed, 13 Aug 2008 18:49:19 +0300 [thread overview]
Message-ID: <bef0d710808130849v56389a15m8de0b60e1f4e61b3@mail.gmail.com> (raw)
In-Reply-To: <115224fb0808130646q6249467eo94348a48c26047d4@mail.gmail.com>
Before I get anymore strawman arguments, here's the definitive experiment:
$ ls -U1 /usr/share/fonts/vista/ | grep erda
Verdanai.ttf
Verdana.ttf
Verdanaz.ttf
Verdanab.ttf
$ ls -U1 /xp/wtf/
Verdana.ttf
Verdanab.ttf
Verdanai.ttf
Verdanaz.ttf
Notice that the directory order is different, bold comes before bold
italic in wtf. I actually had to copy the files to a non-ext3
partition (NTFS actually) to get the order to change. Why? Because
with ext3 htree you have *no* control over the order in which the
directory is "laid out", because it's not a linear list anymore.
So, guess what happens if I do:
$ export OSFONTDIR=/xp/wtf/
$ mtxrun --script fonts --reload
$ mtxrun --script fonts --list | grep erda
verdana Verdana
/xp/wtf/Verdana.ttf
verdana bold Verdana Bold
/xp/wtf/Verdanab.ttf
verdana bold italic Verdana Bold Italic
/xp/wtf/Verdanaz.ttf
verdana italic Verdana Italic
/xp/wtf/Verdanai.ttf
$ context taco.tex | grep Verdana
)</xp/wtf/Verdanab.ttf></home/vga/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>
and the correct bold font is loaded in the PDF.
If you still think somehow that this is a problem with Verdana, look
carefully at this list of DejaVu fonts. Some get the bold, and for
some it's missing. It's haphazard depending on the disk order:
$ mtxrun --script fonts --list | grep eja
dejavu lgc sans DejaVu LGC Sans
/usr/share/fonts/dejavu/DejaVuLGCSans.ttf
dejavu lgc sans bold oblique DejaVu LGC Sans Bold Oblique
/usr/share/fonts/dejavu/DejaVuLGCSans-BoldOblique.ttf
dejavu lgc sans condensed DejaVu LGC Sans Condensed
/usr/share/fonts/dejavu/DejaVuLGCSansCondensed.ttf
dejavu lgc sans condensed bold oblique DejaVu LGC Sans Condensed Bold
Oblique /usr/share/fonts/dejavu/DejaVuLGCSansCondensed-BoldOblique.ttf
dejavu lgc sans condensed oblique DejaVu LGC Sans Condensed
Oblique /usr/share/fonts/dejavu/DejaVuLGCSansCondensed-Oblique.ttf
dejavu lgc sans extralight DejaVu LGC Sans ExtraLight
/usr/share/fonts/dejavu/DejaVuLGCSans-ExtraLight.ttf
dejavu lgc sans mono DejaVu LGC Sans Mono
/usr/share/fonts/dejavu/DejaVuLGCSansMono.ttf
dejavu lgc sans mono bold DejaVu LGC Sans Mono Bold
/usr/share/fonts/dejavu/DejaVuLGCSansMono-Bold.ttf
dejavu lgc sans mono bold oblique DejaVu LGC Sans Mono Bold
Oblique /usr/share/fonts/dejavu/DejaVuLGCSansMono-BoldOblique.ttf
dejavu lgc sans mono oblique DejaVu LGC Sans Mono Oblique
/usr/share/fonts/dejavu/DejaVuLGCSansMono-Oblique.ttf
dejavu lgc sans oblique DejaVu LGC Sans Oblique
/usr/share/fonts/dejavu/DejaVuLGCSans-Oblique.ttf
dejavu lgc serif DejaVu LGC Serif
/usr/share/fonts/dejavu/DejaVuLGCSerif.ttf
dejavu lgc serif bold italic DejaVu LGC Serif Bold Italic
/usr/share/fonts/dejavu/DejaVuLGCSerif-BoldItalic.ttf
dejavu lgc serif condensed DejaVu LGC Serif Condensed
/usr/share/fonts/dejavu/DejaVuLGCSerifCondensed.ttf
dejavu lgc serif condensed bold DejaVu LGC Serif Condensed
Bold /usr/share/fonts/dejavu/DejaVuLGCSerifCondensed-Bold.ttf
dejavu lgc serif condensed bold italic DejaVu LGC Serif Condensed
Bold Italic /usr/share/fonts/dejavu/DejaVuLGCSerifCondensed-BoldItalic.ttf
dejavu lgc serif italic DejaVu LGC Serif Italic
/usr/share/fonts/dejavu/DejaVuLGCSerif-Italic.ttf
dejavu lgc serif italic condensed DejaVu LGC Serif Italic
Condensed
/usr/share/fonts/dejavu/DejaVuLGCSerifCondensed-Italic.ttf
dejavu sans DejaVu Sans
/usr/share/fonts/dejavu/DejaVuSans.ttf
dejavu sans bold DejaVu Sans Bold
/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf
dejavu sans bold oblique DejaVu Sans Bold Oblique
/usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf
dejavu sans condensed DejaVu Sans Condensed
/usr/share/fonts/dejavu/DejaVuSansCondensed.ttf
dejavu sans condensed bold DejaVu Sans Condensed Bold
/usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf
dejavu sans condensed bold oblique DejaVu Sans Condensed Bold
Oblique /usr/share/fonts/dejavu/DejaVuSansCondensed-BoldOblique.ttf
dejavu sans condensed oblique DejaVu Sans Condensed Oblique
/usr/share/fonts/dejavu/DejaVuSansCondensed-Oblique.ttf
dejavu sans extralight DejaVu Sans ExtraLight
/usr/share/fonts/dejavu/DejaVuSans-ExtraLight.ttf
dejavu sans mono DejaVu Sans Mono
/usr/share/fonts/dejavu/DejaVuSansMono.ttf
dejavu sans mono bold DejaVu Sans Mono Bold
/usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf
dejavu sans mono bold oblique DejaVu Sans Mono Bold Oblique
/usr/share/fonts/dejavu/DejaVuSansMono-BoldOblique.ttf
dejavu sans mono oblique DejaVu Sans Mono Oblique
/usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf
dejavu sans oblique DejaVu Sans Oblique
/usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf
dejavu serif DejaVu Serif
/usr/share/fonts/dejavu/DejaVuSerif.ttf
dejavu serif bold DejaVu Serif Bold
/usr/share/fonts/dejavu/DejaVuSerif-Bold.ttf
dejavu serif bold italic DejaVu Serif Bold Italic
/usr/share/fonts/dejavu/DejaVuSerif-BoldItalic.ttf
dejavu serif condensed DejaVu Serif Condensed
/usr/share/fonts/dejavu/DejaVuSerifCondensed.ttf
dejavu serif condensed bold DejaVu Serif Condensed Bold
/usr/share/fonts/dejavu/DejaVuSerifCondensed-Bold.ttf
dejavu serif condensed bold italic DejaVu Serif Condensed Bold
Italic /usr/share/fonts/dejavu/DejaVuSerifCondensed-BoldItalic.ttf
dejavu serif italic DejaVu Serif Italic
/usr/share/fonts/dejavu/DejaVuSerif-Italic.ttf
dejavu serif italic condensed DejaVu Serif Italic Condensed
/usr/share/fonts/dejavu/DejaVuSerifCondensed-Italic.ttf
Now the easiest way for you to stop depending on the disk order of
directory entries is to sort the list you get from globbing. This will
work for bold vs bold italic, but it will probably break at some other
name sequence. The only reliable way is avoid clobbering existing
entries in the hash in the same --reload run. But this won't work for
incremental updates, since you can't tell whether you should drop an
old hash entry or not. So if you want to use hashing, you really need
a naming scheme that avoids creating conflicts.
XeTeX solves this problem by using *only* the ID 16 and ID 17 OpenType
values to create a unique name for system fonts. I actually filed a
bug about lack of support for the common ID 1/2 names, but Johnathan
WONTFIXED it because he really wants the font names to be unambiguous,
and using ID 1 and ID 2 values in addition to ID 16/17 doesn't
guarantee that. Your situation is worse, because you want to support
all sort of legacy fonts in that single hashtable.
Anyway, I've wasted enough of my time on this matter. If you sill
don't grok it, forget about it.
BTW, the Lua 5.1 "reference" manual is a joke. How do you printf a
boolean? What's the syntax for their definitely non-standard regexps.
No answers in that "reference".
On Wed, Aug 13, 2008 at 4:46 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
> On Wed, Aug 13, 2008 at 1:47 PM, Vasile Gaburici <vgaburici@gmail.com> wrote:
>> On Wed, Aug 13, 2008 at 2:20 PM, Hans Hagen <pragma@wxs.nl> wrote:
>>> Vasile Gaburici wrote:
>>>>
>>>> As for the missing bold, it seems there's a bug in the naming scheme:
>>>> Ii the bold italic file gets read from the disk before the bold, then
>>>> you don't get the right entries. It so happens that most of the fonts
>>>> in that dir had bold before bold italic, e.g.
>>>>
>>>> fontnames | identifying ttf font /usr/share/fonts/vista/Verdanai.ttf
>>>> fontnames | identifying ttf font /usr/share/fonts/vista/Verdana.ttf
>>>> fontnames | identifying ttf font /usr/share/fonts/vista/Verdanaz.ttf
>>>> fontnames | identifying ttf font /usr/share/fonts/vista/Verdanab.ttf
>>>>
>>>> fontnames | identifying otf font
>>>> /usr/share/fonts/vista/C-series/Calibri Bold Italic.otf
>>>> fontnames | identifying otf font
>>>> /usr/share/fonts/vista/C-series/Calibri.otf
>>>> fontnames | identifying otf font
>>>> /usr/share/fonts/vista/C-series/Calibri Italic.otf
>>>> fontnames | identifying otf font
>>>> /usr/share/fonts/vista/C-series/Calibri Bold.otf
>>>>
>>>> So, I've added some extra code (patch attached) to print the names it
>>>> adds to the hash. As you can see there is a clash: both bold italic
>>>> and bold want to "own" bold...
>>>
>>> how do you define the font; don't use spaces!
>>
>> ??? If your're complaining that Calibri has spaces in the file name,
>> it's a non-issue here. Verdana has the same "bold not listed" problem,
>> even though there are no spaces in the file name...
>
> Where do you got the vista fonts, i know them only in TrueType format
> and more verbose names.
>
> Wolfgang
>
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2008-08-13 15:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-12 11:50 Vasile Gaburici
2008-08-13 7:43 ` Taco Hoekwater
2008-08-13 8:31 ` Hans Hagen
2008-08-13 9:21 ` Vasile Gaburici
2008-08-13 10:04 ` Hans Hagen
2008-08-13 10:05 ` Vasile Gaburici
2008-08-13 11:20 ` Hans Hagen
2008-08-13 11:47 ` Vasile Gaburici
2008-08-13 13:46 ` Wolfgang Schuster
2008-08-13 15:49 ` Vasile Gaburici [this message]
2008-08-13 16:19 ` Hans Hagen
2008-08-13 17:00 ` Taco Hoekwater
2008-08-14 4:33 ` Vasile Gaburici
2008-08-14 5:48 ` Vasile Gaburici
2008-08-14 8:33 ` Taco Hoekwater
2008-08-14 8:48 ` Hans Hagen
2008-08-14 9:06 ` Thomas A. Schmitz
2008-08-13 12:29 ` Taco Hoekwater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bef0d710808130849v56389a15m8de0b60e1f4e61b3@mail.gmail.com \
--to=vgaburici@gmail.com \
--cc=gaburici@cs.umd.edu \
--cc=ntg-context@ntg.nl \
--cc=pragma@wxs.nl \
--cc=schuster.wolfgang@googlemail.com \
--cc=taco@elvenkind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).