ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [font-chk.lua] missing glyph tracker
@ 2013-06-20 11:59 Philipp Gesang
  2013-06-20 14:09 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Gesang @ 2013-06-20 11:59 UTC (permalink / raw)
  To: ConTeXt ML


[-- Attachment #1.1: Type: text/plain, Size: 1024 bytes --]

Hi Hans,

in font-chk.lua, the function checkers.missing fails to assign
the var “lastfont”, leading to a meaningless test for equivalence
with “font”. See patch below.

Also, may I ask you to include the unicode character in the
tracker message? This would make the output more legible, imo.
Something like this (line 71):

-        report_fonts("char %U in font %a with id %a: %s",char,tfmdata.properties.fullname,font,message)
+        report_fonts("char %U (%s) in font %a with id %a: %s",char,utf.char(char),tfmdata.properties.fullname,font,message)

Best regards,
Philipp




--- font-chk.lua.orig	2013-06-20 13:46:56.282164831 +0200
+++ font-chk.lua	2013-06-20 13:47:15.224965072 +0200
@@ -210,6 +210,7 @@
         local char = n.char
         if font ~= lastfont then
             characters = fontcharacters[font]
+            lastfont = font
         end
         if not characters[char] and is_character[chardata[char].category] then
             if action == "remove" then


[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: [font-chk.lua] missing glyph tracker
  2013-06-20 11:59 [font-chk.lua] missing glyph tracker Philipp Gesang
@ 2013-06-20 14:09 ` Hans Hagen
  2013-06-20 14:53   ` Philipp Gesang
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2013-06-20 14:09 UTC (permalink / raw)
  To: ntg-context

On 6/20/2013 1:59 PM, Philipp Gesang wrote:

> -        report_fonts("char %U in font %a with id %a: %s",char,tfmdata.properties.fullname,font,message)
> +        report_fonts("char %U (%s) in font %a with id %a: %s",char,utf.char(char),tfmdata.properties.fullname,font,message)

%C does that, so

report_fonts("char %C in font %a with id %a: %s", char, 
tfmdata.properties.fullname, font, message)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: [font-chk.lua] missing glyph tracker
  2013-06-20 14:09 ` Hans Hagen
@ 2013-06-20 14:53   ` Philipp Gesang
  2013-06-20 16:46     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Gesang @ 2013-06-20 14:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1668 bytes --]

···<date: 2013-06-20, Thursday>···<from: Hans Hagen>···

> On 6/20/2013 1:59 PM, Philipp Gesang wrote:
> 
> >-        report_fonts("char %U in font %a with id %a: %s",char,tfmdata.properties.fullname,font,message)
> >+        report_fonts("char %U (%s) in font %a with id %a: %s",char,utf.char(char),tfmdata.properties.fullname,font,message)
> 
> %C does that, so

Very nice! “%C” isn’t in the list in util-str.lua. Btw. are the
formatters stable yet?

Many thanks,
Philipp



> report_fonts("char %C in font %a with id %a: %s", char, tfmdata.properties.fullname, font, message)
> 
> Hans
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: [font-chk.lua] missing glyph tracker
  2013-06-20 14:53   ` Philipp Gesang
@ 2013-06-20 16:46     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2013-06-20 16:46 UTC (permalink / raw)
  To: ntg-context

On 6/20/2013 4:53 PM, Philipp Gesang wrote:
> ···<date: 2013-06-20, Thursday>···<from: Hans Hagen>···
>
>> On 6/20/2013 1:59 PM, Philipp Gesang wrote:
>>
>>> -        report_fonts("char %U in font %a with id %a: %s",char,tfmdata.properties.fullname,font,message)
>>> +        report_fonts("char %U (%s) in font %a with id %a: %s",char,utf.char(char),tfmdata.properties.fullname,font,message)
>>
>> %C does that, so
>
> Very nice! “%C” isn’t in the list in util-str.lua. Btw. are the
> formatters stable yet?

yes

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2013-06-20 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 11:59 [font-chk.lua] missing glyph tracker Philipp Gesang
2013-06-20 14:09 ` Hans Hagen
2013-06-20 14:53   ` Philipp Gesang
2013-06-20 16:46     ` Hans Hagen

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