ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Font problems with latest minimals on Linux
@ 2008-08-12 11:50 Vasile Gaburici
  2008-08-13  7:43 ` Taco Hoekwater
  2008-08-13 12:29 ` Taco Hoekwater
  0 siblings, 2 replies; 18+ messages in thread
From: Vasile Gaburici @ 2008-08-12 11:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I've switched to the rsync-ed minimals on Linux. There are still some
problems with fonts:

1) Bold is still missing from fonts pulled via OSFONTDIR, e.g.:

verdana                           Verdana
/usr/share/fonts/vista/Verdana.ttf
verdana bold italic               Verdana Bold Italic
/usr/share/fonts/vista/Verdanaz.ttf
verdana italic                    Verdana Italic
/usr/share/fonts/vista/Verdanai.ttf

2) OSFONTDIR is not recursive. To get the above I used "export
OSFONTDIR=/usr/share/fonts/vista/", just
"export OSFONTDIR=/usr/share/fonts/" doesn't work.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-12 11:50 Font problems with latest minimals on Linux Vasile Gaburici
@ 2008-08-13  7:43 ` Taco Hoekwater
  2008-08-13  8:31   ` Hans Hagen
  2008-08-13 10:05   ` Vasile Gaburici
  2008-08-13 12:29 ` Taco Hoekwater
  1 sibling, 2 replies; 18+ messages in thread
From: Taco Hoekwater @ 2008-08-13  7:43 UTC (permalink / raw)
  To: gaburici, mailing list for ConTeXt users



Vasile Gaburici wrote:
> I've switched to the rsync-ed minimals on Linux. There are still some
> problems with fonts:
> 
> 1) Bold is still missing from fonts pulled via OSFONTDIR, e.g.:
> 
> verdana                           Verdana
> /usr/share/fonts/vista/Verdana.ttf
> verdana bold italic               Verdana Bold Italic
> /usr/share/fonts/vista/Verdanaz.ttf
> verdana italic                    Verdana Italic
> /usr/share/fonts/vista/Verdanai.ttf

This works OK for ttf fonts on my linux machine, but I don't
have the ttf version of verdana, so perhaps it is something
special to that font.

> 2) OSFONTDIR is not recursive. To get the above I used "export
> OSFONTDIR=/usr/share/fonts/vista/", just
> "export OSFONTDIR=/usr/share/fonts/" doesn't work.

Yes, recursion would be nice.

Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  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:05   ` Vasile Gaburici
  1 sibling, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2008-08-13  8:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: gaburici

Taco Hoekwater wrote:
> 
> Vasile Gaburici wrote:
>> I've switched to the rsync-ed minimals on Linux. There are still some
>> problems with fonts:
>>
>> 1) Bold is still missing from fonts pulled via OSFONTDIR, e.g.:
>>
>> verdana                           Verdana
>> /usr/share/fonts/vista/Verdana.ttf
>> verdana bold italic               Verdana Bold Italic
>> /usr/share/fonts/vista/Verdanaz.ttf
>> verdana italic                    Verdana Italic
>> /usr/share/fonts/vista/Verdanai.ttf
> 
> This works OK for ttf fonts on my linux machine, but I don't
> have the ttf version of verdana, so perhaps it is something
> special to that font.
> 
>> 2) OSFONTDIR is not recursive. To get the above I used "export
>> OSFONTDIR=/usr/share/fonts/vista/", just
>> "export OSFONTDIR=/usr/share/fonts/" doesn't work.
> 
> Yes, recursion would be nice.

font-syn.lua, line 190:

                 path = input.clean_path(path .. "/")
                 path = path:gsub("/+","/")
path = path .. "**/"

insert the last line and see what happens (untested because i have a 
flat system path)


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13  8:31   ` Hans Hagen
@ 2008-08-13  9:21     ` Vasile Gaburici
  2008-08-13 10:04       ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: Vasile Gaburici @ 2008-08-13  9:21 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Wed, Aug 13, 2008 at 11:31 AM, Hans Hagen <pragma@wxs.nl> wrote:
>> Yes, recursion would be nice.
> font-syn.lua, line 190:
>
>                path = input.clean_path(path .. "/")
>                path = path:gsub("/+","/")
> path = path .. "**/"
>
> insert the last line and see what happens (untested because i have a flat
> system path)

It works.

>
>
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                             | www.pragma-pod.nl
> -----------------------------------------------------------------
>
>
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13  9:21     ` Vasile Gaburici
@ 2008-08-13 10:04       ` Hans Hagen
  0 siblings, 0 replies; 18+ messages in thread
From: Hans Hagen @ 2008-08-13 10:04 UTC (permalink / raw)
  To: gaburici; +Cc: mailing list for ConTeXt users

Vasile Gaburici wrote:
> On Wed, Aug 13, 2008 at 11:31 AM, Hans Hagen <pragma@wxs.nl> wrote:
>>> Yes, recursion would be nice.
>> font-syn.lua, line 190:
>>
>>                path = input.clean_path(path .. "/")
>>                path = path:gsub("/+","/")
>> path = path .. "**/"
>>
>> insert the last line and see what happens (untested because i have a flat
>> system path)
> 
> It works.

there will be a beta later today; taco and i tested a different patch on 
win/lin and it looks like it works; you need to regenerate the font 
database then


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13  7:43 ` Taco Hoekwater
  2008-08-13  8:31   ` Hans Hagen
@ 2008-08-13 10:05   ` Vasile Gaburici
  2008-08-13 11:20     ` Hans Hagen
  1 sibling, 1 reply; 18+ messages in thread
From: Vasile Gaburici @ 2008-08-13 10:05 UTC (permalink / raw)
  To: Taco Hoekwater; +Cc: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 4695 bytes --]

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...

fontnames | identifying ttf font /usr/share/fonts/vista/Verdanaz.ttf
add | verdana bold italic -> {ttf, Verdana Bold Italic,
/usr/share/fonts/vista/Verdanaz.ttf, ...}
add | verdanabolditalic -> {ttf, Verdana Bold Italic,
/usr/share/fonts/vista/Verdanaz.ttf, ...}
add | verdana-bolditalic -> {ttf, Verdana Bold Italic,
/usr/share/fonts/vista/Verdanaz.ttf, ...}
add | verdanabolditalic -> {ttf, Verdana Bold Italic,
/usr/share/fonts/vista/Verdanaz.ttf, ...}
add | verdana bold -> {ttf, Verdana Bold Italic,
/usr/share/fonts/vista/Verdanaz.ttf, ...}
add | verdanabold -> {ttf, Verdana Bold Italic,
/usr/share/fonts/vista/Verdanaz.ttf, ...}
fontnames | identifying ttf font /usr/share/fonts/vista/Verdanab.ttf
add | verdana bold -> {ttf, Verdana Bold,
/usr/share/fonts/vista/Verdanab.ttf, ...}
add | verdanabold -> {ttf, Verdana Bold,
/usr/share/fonts/vista/Verdanab.ttf, ...}
add | verdana-bold -> {ttf, Verdana Bold,
/usr/share/fonts/vista/Verdanab.ttf, ...}
add | verdanabold -> {ttf, Verdana Bold,
/usr/share/fonts/vista/Verdanab.ttf, ...}
add | verdana bold -> {ttf, Verdana Bold,
/usr/share/fonts/vista/Verdanab.ttf, ...}
add | verdanabold -> {ttf, Verdana Bold,
/usr/share/fonts/vista/Verdanab.ttf, ...}

fontnames | identifying otf font
/usr/share/fonts/vista/C-series/Calibri Bold Italic.otf
add | calibri bold italic -> {otf, Calibri Bold Italic,
/usr/share/fonts/vista/C-series/Calibri Bold Italic.otf, ...}
add | calibribolditalic -> {otf, Calibri Bold Italic,
/usr/share/fonts/vista/C-series/Calibri Bold Italic.otf, ...}
add | calibri-bolditalic -> {otf, Calibri Bold Italic,
/usr/share/fonts/vista/C-series/Calibri Bold Italic.otf, ...}
add | calibribolditalic -> {otf, Calibri Bold Italic,
/usr/share/fonts/vista/C-series/Calibri Bold Italic.otf, ...}
add | calibri bold -> {otf, Calibri Bold Italic,
/usr/share/fonts/vista/C-series/Calibri Bold Italic.otf, ...}
add | calibribold -> {otf, Calibri Bold Italic,
/usr/share/fonts/vista/C-series/Calibri Bold Italic.otf, ...}
fontnames | identifying otf font
/usr/share/fonts/vista/C-series/Calibri Bold.otf
add | calibri bold -> {otf, Calibri Bold,
/usr/share/fonts/vista/C-series/Calibri Bold.otf, ...}
add | calibribold -> {otf, Calibri Bold,
/usr/share/fonts/vista/C-series/Calibri Bold.otf, ...}
add | calibri-bold -> {otf, Calibri Bold,
/usr/share/fonts/vista/C-series/Calibri Bold.otf, ...}
add | calibribold -> {otf, Calibri Bold,
/usr/share/fonts/vista/C-series/Calibri Bold.otf, ...}
add | calibri bold -> {otf, Calibri Bold,
/usr/share/fonts/vista/C-series/Calibri Bold.otf, ...}
add | calibribold -> {otf, Calibri Bold,
/usr/share/fonts/vista/C-series/Calibri Bold.otf, ...}

I don't know how to fix since it's not clear to me what names you
actually want...

On Wed, Aug 13, 2008 at 10:43 AM, Taco Hoekwater <taco@elvenkind.com> wrote:
>
>
> Vasile Gaburici wrote:
>>
>> I've switched to the rsync-ed minimals on Linux. There are still some
>> problems with fonts:
>>
>> 1) Bold is still missing from fonts pulled via OSFONTDIR, e.g.:
>>
>> verdana                           Verdana
>> /usr/share/fonts/vista/Verdana.ttf
>> verdana bold italic               Verdana Bold Italic
>> /usr/share/fonts/vista/Verdanaz.ttf
>> verdana italic                    Verdana Italic
>> /usr/share/fonts/vista/Verdanai.ttf
>
> This works OK for ttf fonts on my linux machine, but I don't
> have the ttf version of verdana, so perhaps it is something
> special to that font.
>
>> 2) OSFONTDIR is not recursive. To get the above I used "export
>> OSFONTDIR=/usr/share/fonts/vista/", just
>> "export OSFONTDIR=/usr/share/fonts/" doesn't work.
>
> Yes, recursion would be nice.
>
> Best wishes,
> Taco
>
>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: whynobold.patch --]
[-- Type: text/x-patch; name=whynobold.patch, Size: 1439 bytes --]

diff -up ./font-syn.lua.nobold ./font-syn.lua
--- ./font-syn.lua.nobold	2008-08-13 12:24:32.000000000 +0300
+++ ./font-syn.lua	2008-08-13 12:52:40.000000000 +0300
@@ -27,7 +27,7 @@ fonts.names.be_clever  = true
 fonts.names.enabled    = true
 fonts.names.autoreload = toboolean(os.env['MTX.FONTS.AUTOLOAD'] or os.env['MTX_FONTS_AUTOLOAD'] or "no")
 fonts.names.cache      = containers.define("fonts","data",fonts.names.version,true)
-fonts.names.trace      = false
+fonts.names.trace      = true
 
 --[[ldx--
 <p>It would make sense to implement the filters in the related modules,
@@ -120,8 +120,18 @@ function fonts.names.identify(verbose)
     local function add(n,fontname,filename,suffix, sub)
         n = n:lower()
         if not mapping[n] then mapping[n], nofok = { suffix, fontname, filename, sub }, nofok + 1 end
+        if fonts.names.trace then
+           logs.report("add","%s -> {%s, %s, %s, ...}", n, suffix, fontname, filename)
+           logs.push()
+           logs.pop()
+        end
         n = n:gsub("[^%a%d]","")
         if not mapping[n] then mapping[n], nofok = { suffix, fontname, filename, sub }, nofok + 1 end
+        if fonts.names.trace then
+           logs.report("add","%s -> {%s, %s, %s, ...}", n, suffix, fontname, filename)
+           logs.push()
+           logs.pop()
+        end
     end
     local function check(result, filename, suffix, is_sub)
         local fontname = result.fullname

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13 10:05   ` Vasile Gaburici
@ 2008-08-13 11:20     ` Hans Hagen
  2008-08-13 11:47       ` Vasile Gaburici
  0 siblings, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2008-08-13 11:20 UTC (permalink / raw)
  To: gaburici, mailing list for ConTeXt users; +Cc: Taco Hoekwater

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!

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13 11:20     ` Hans Hagen
@ 2008-08-13 11:47       ` Vasile Gaburici
  2008-08-13 13:46         ` Wolfgang Schuster
  0 siblings, 1 reply; 18+ messages in thread
From: Vasile Gaburici @ 2008-08-13 11:47 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users, Taco Hoekwater

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...

>
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                             | www.pragma-pod.nl
> -----------------------------------------------------------------
>
>
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-12 11:50 Font problems with latest minimals on Linux Vasile Gaburici
  2008-08-13  7:43 ` Taco Hoekwater
@ 2008-08-13 12:29 ` Taco Hoekwater
  1 sibling, 0 replies; 18+ messages in thread
From: Taco Hoekwater @ 2008-08-13 12:29 UTC (permalink / raw)
  To: gaburici, mailing list for ConTeXt users



Vasile Gaburici wrote:
> I've switched to the rsync-ed minimals on Linux. There are still some
> problems with fonts:
> 
> 1) Bold is still missing from fonts pulled via OSFONTDIR, e.g.:
> 
> verdana                           Verdana
> /usr/share/fonts/vista/Verdana.ttf
> verdana bold italic               Verdana Bold Italic
> /usr/share/fonts/vista/Verdanaz.ttf
> verdana italic                    Verdana Italic
> /usr/share/fonts/vista/Verdanai.ttf

This may sound silly, but: does it work or not? To be precise,
what is the font used by the pdf result (if any) of

   \starttext
   \definedfont[name:VerdanaBold] Hello
   \stoptext

Best wishes,
Taco

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13 11:47       ` Vasile Gaburici
@ 2008-08-13 13:46         ` Wolfgang Schuster
  2008-08-13 15:49           ` Vasile Gaburici
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfgang Schuster @ 2008-08-13 13:46 UTC (permalink / raw)
  To: gaburici, mailing list for ConTeXt users; +Cc: Hans Hagen, Taco Hoekwater

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13 13:46         ` Wolfgang Schuster
@ 2008-08-13 15:49           ` Vasile Gaburici
  2008-08-13 16:19             ` Hans Hagen
  2008-08-13 17:00             ` Taco Hoekwater
  0 siblings, 2 replies; 18+ messages in thread
From: Vasile Gaburici @ 2008-08-13 15:49 UTC (permalink / raw)
  To: Wolfgang Schuster
  Cc: mailing list for ConTeXt users, Hans Hagen, Taco Hoekwater

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13 15:49           ` Vasile Gaburici
@ 2008-08-13 16:19             ` Hans Hagen
  2008-08-13 17:00             ` Taco Hoekwater
  1 sibling, 0 replies; 18+ messages in thread
From: Hans Hagen @ 2008-08-13 16:19 UTC (permalink / raw)
  To: gaburici; +Cc: mailing list for ConTeXt users, Taco Hoekwater

Vasile Gaburici wrote:
> 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

did you test the latest beta (this afternoon version?)

> 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.

part of the problem was that the mtx-font lookup (shown by list) 
differed from the one used in practice (in tex); this is now harmonized 
(and seems to be ok on taco's and my machine)

> Anyway, I've wasted enough of my time on this matter. If you sill
> don't grok it, forget about it.

you don't want to know how much time we spent on fonts so far -)

> 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.

they are not regexps but just expressions; being a lightweight language 
lua does not have regexp (as the manual states: it would add more code 
than lua itself; however, there is lpeg (also in luatex) which is not 
only more poweeful than regexp but also is efficient wrt the implementation

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13 15:49           ` Vasile Gaburici
  2008-08-13 16:19             ` Hans Hagen
@ 2008-08-13 17:00             ` Taco Hoekwater
  2008-08-14  4:33               ` Vasile Gaburici
  1 sibling, 1 reply; 18+ messages in thread
From: Taco Hoekwater @ 2008-08-13 17:00 UTC (permalink / raw)
  To: gaburici, mailing list for ConTeXt users; +Cc: Hans Hagen

Vasile Gaburici wrote:
> Before I get anymore strawman arguments, here's the definitive experiment:

As Hans said, should be corrected in the latest beta. Please cut us some 
slack here, debugging unreproducible problems is hard and timeconsuming.

> 
> BTW, the Lua 5.1 "reference" manual is a joke.
> How do you printf a boolean? 

This is indeed not in the manual, but lua behaves like most other
languages with boolean types: the boolean prints the string "true"
or "false"  in a string (=debugging) context. You can force
conversion to string by calling tostring() on it.

> What's the syntax for their definitely non-standard regexps.
> No answers in that "reference".

Section 5.4.1 Patterns

Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-13 17:00             ` Taco Hoekwater
@ 2008-08-14  4:33               ` Vasile Gaburici
  2008-08-14  5:48                 ` Vasile Gaburici
  0 siblings, 1 reply; 18+ messages in thread
From: Vasile Gaburici @ 2008-08-14  4:33 UTC (permalink / raw)
  To: Taco Hoekwater; +Cc: mailing list for ConTeXt users, Hans Hagen

On Wed, Aug 13, 2008 at 8:00 PM, Taco Hoekwater <taco@elvenkind.com> wrote:
> Vasile Gaburici wrote:
>>
>> Before I get anymore strawman arguments, here's the definitive experiment:
>
> As Hans said, should be corrected in the latest beta. Please cut us some
> slack here, debugging unreproducible problems is hard and timeconsuming.

Okay, I've updated to the latest beta. Recursive OSFONTDIR works now
for "script --fonts --reload" and for "context", but "script --fonts
--list" is broken: no output.

The other bug, i.e. embedding bold italic instead of bold for some
fonts, is still present.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  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
  0 siblings, 2 replies; 18+ messages in thread
From: Vasile Gaburici @ 2008-08-14  5:48 UTC (permalink / raw)
  To: Taco Hoekwater; +Cc: mailing list for ConTeXt users, Hans Hagen

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

If you still haven't figured out how to reproduce it, apply the
patched I've attached. It will force the hash entries to be added in
sorted order. With the patch applied, if you have some fonts called

Calibri Bold Italic.otf
Calibri Bold.otf
Calibri Italic.otf
Calibri.otf

the order of hash insertions will always exactly as above, regardless
of disk order, e.g.:

filename | 49 -> /usr/share/fonts/vista/C-series/Calibri Bold Italic.otf
filename | 50 -> /usr/share/fonts/vista/C-series/Calibri Bold.otf
filename | 51 -> /usr/share/fonts/vista/C-series/Calibri Italic.otf
filename | 52 -> /usr/share/fonts/vista/C-series/Calibri.otf

So, you'll get bold italic instead of bold in the PDF.

Feel free to fiddle with the sort function if you name fonts
differently, but you need to make sure that bold italic gets loaded
before bold for the bug to occur.

On Thu, Aug 14, 2008 at 7:33 AM, Vasile Gaburici <vgaburici@gmail.com> wrote:
> On Wed, Aug 13, 2008 at 8:00 PM, Taco Hoekwater <taco@elvenkind.com> wrote:
>> Vasile Gaburici wrote:
>>>
>>> Before I get anymore strawman arguments, here's the definitive experiment:
>>
>> As Hans said, should be corrected in the latest beta. Please cut us some
>> slack here, debugging unreproducible problems is hard and timeconsuming.
>
> Okay, I've updated to the latest beta. Recursive OSFONTDIR works now
> for "script --fonts --reload" and for "context", but "script --fonts
> --list" is broken: no output.
>
> The other bug, i.e. embedding bold italic instead of bold for some
> fonts, is still present.
>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: reveal-bold-bug.patch --]
[-- Type: text/x-patch; name=reveal-bold-bug.patch, Size: 1085 bytes --]

diff -up context/tex/texmf-context/tex/context/base/font-syn.lua.nosort context/tex/texmf-context/tex/context/base/font-syn.lua
--- context/tex/texmf-context/tex/context/base/font-syn.lua.nosort	2008-08-14 07:43:48.000000000 +0300
+++ context/tex/texmf-context/tex/context/base/font-syn.lua	2008-08-14 08:46:28.000000000 +0300
@@ -193,8 +193,12 @@ function fonts.names.identify(verbose)
                 local pattern = path .. "**." .. suffix -- ** forces recurse
                 logs.report("fontnames", "globbing path %s",pattern)
                 local t = dir.glob(pattern)
-                for _, name in pairs(t) do -- ipairs
+                table.sort(t, function (str1, str2)
+                                 return str1 < str2
+                              end)
+                for huh, name in pairs(t) do -- ipairs
                 --  if lfs.isfile(name) then -- always true anyway
+                        logs.report("filename", "%d -> %s", huh, name)
                         identify(name,file.basename(name),suffix)
                 --  end
                 end

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-14  5:48                 ` Vasile Gaburici
@ 2008-08-14  8:33                   ` Taco Hoekwater
  2008-08-14  8:48                   ` Hans Hagen
  1 sibling, 0 replies; 18+ messages in thread
From: Taco Hoekwater @ 2008-08-14  8:33 UTC (permalink / raw)
  To: gaburici; +Cc: mailing list for ConTeXt users, Hans Hagen



Vasile Gaburici wrote:
> 
> Feel free to fiddle with the sort function if you name fonts
> differently, but you need to make sure that bold italic gets loaded
> before bold for the bug to occur.

Ok, bug found and squashed. Patch is below

>> Okay, I've updated to the latest beta. Recursive OSFONTDIR works now
>> for "script --fonts --reload" and for "context", but "script --fonts
>> --list" is broken: no output.

Hans changed the commandline so that "nothing" is no longer the same
as "*". This works:

   $ mtxrun script --fonts --list \*

Best wishes,
Taco

--- font-syn.lua.old    2008-08-13 14:47:44.000000000 +0200
+++ font-syn.lua        2008-08-14 10:25:13.631806083 +0200
@@ -133,7 +133,8 @@
              fontname = fontname or result.fontname
              add(result.fontname, fontname, filename, suffix, is_sub)
          end
-        if result.familyname and result.weight then
+        if result.familyname and result.weight and
+           result.italicangle == 0 then
              local madename = result.familyname .. " " .. result.weight
              fontname = fontname or madename
              add(madename, fontname, filename, suffix, is_sub)



___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  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
  1 sibling, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2008-08-14  8:48 UTC (permalink / raw)
  To: gaburici; +Cc: mailing list for ConTeXt users, Taco Hoekwater

Vasile Gaburici wrote:
> If you still haven't figured out how to reproduce it, apply the
> patched I've attached. It will force the hash entries to be added in
> sorted order. With the patch applied, if you have some fonts called
> 
> Calibri Bold Italic.otf
> Calibri Bold.otf
> Calibri Italic.otf
> Calibri.otf
> 
> the order of hash insertions will always exactly as above, regardless
> of disk order, e.g.:
> 
> filename | 49 -> /usr/share/fonts/vista/C-series/Calibri Bold Italic.otf
> filename | 50 -> /usr/share/fonts/vista/C-series/Calibri Bold.otf
> filename | 51 -> /usr/share/fonts/vista/C-series/Calibri Italic.otf
> filename | 52 -> /usr/share/fonts/vista/C-series/Calibri.otf
> 
> So, you'll get bold italic instead of bold in the PDF.

the order is just one factor. what actually happens is that there is a 
compensation for buggy font names (as happens often in afm files) so in 
practice one entry might become three entries; taco noticed that one of 
the fallbacks create this way will then obscure a following one

in your case it might be order on disk (although the current mechanisms 
do some sorting) but on our machines more likely is that a bugged afm 
font obscures later otf's (with similar names)

anyhow, we'll cook up a patch

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Font problems with latest minimals on Linux
  2008-08-14  8:48                   ` Hans Hagen
@ 2008-08-14  9:06                     ` Thomas A. Schmitz
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas A. Schmitz @ 2008-08-14  9:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Aug 14, 2008, at 10:48 AM, Hans Hagen wrote:

> the order is just one factor. what actually happens is that there is a
> compensation for buggy font names (as happens often in afm files) so  
> in
> practice one entry might become three entries; taco noticed that one  
> of
> the fallbacks create this way will then obscure a following one
>
> in your case it might be order on disk (although the current  
> mechanisms
> do some sorting) but on our machines more likely is that a bugged afm
> font obscures later otf's (with similar names)
>
> anyhow, we'll cook up a patch
>
> Hans

Very funny - I was following this thread with interest, yet had never  
encountered this problem. This morning, I played around with the  
minimals on my linux eeepc (had always used TeXLive, but saving some  
space seemed like a good idea) and got exactly the same problem:  
instead of bold, I get bold italic. If I typeset the same file with my  
TeXLive installation, I get proper bold. So Vasile is on to something  
here...

Thomas
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2008-08-14  9:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-12 11:50 Font problems with latest minimals on Linux 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
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

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).