ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Leah Neukirchen via ntg-context <ntg-context@ntg.nl>
To: <ntg-context@ntg.nl>
Cc: Leah Neukirchen <leah@vuxu.org>
Subject: Re: LMTX generates PDFs with non-working fonts on real printers
Date: Thu, 06 Oct 2022 18:42:20 +0200	[thread overview]
Message-ID: <87bkqohpjn.fsf@vuxu.org> (raw)
In-Reply-To: <0cdefffe-652c-5cb4-46c9-736cee9657b7@xs4all.nl> (Hans Hagen via ntg-context's message of "Thu, 6 Oct 2022 16:23:52 +0200")

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

Hans Hagen via ntg-context <ntg-context@ntg.nl> writes:

> On 10/6/2022 2:42 PM, Leah Neukirchen wrote:
>
>> But I also found yet another printer model that doesn't print:
>> the HP Color LaserJet 4700 (Model Q7492A, Firmware 20060821 46.031.1).
>> Since you seem to own the only printer that works ;) would
>> you be so kind and share which model you have?
>
> We have a HP ColorFlowMFP X585 full-width highspeed duplex inkjet
> printer (a couple of years old, always prints ok). So far we never
> heard of printing failures elsewhere.
>
>> I also wondered whether bisecting the snapshot-repo would work.
>> But I only have one LMTX binary; this font handling should be all in
>> lua code tho?
>
> It makes no sense to compare luametatex and luatex .. it's different
> machinery.
>
> Btw, some in the thread mention issues (like bad looking heros shapes)
> but in your case there is no print at all, so that is different. Isn't
> there some error log in these printer?

The error log didn't contain anything useful.

I made two experiments now.

First, I modified the MKIV PDF file to use the MKXL font stream, and
changed the text primitives to use low chars.  This renders fine on
all PDF viewers I found (text is garbled, of course), but it still
doesn't print.  So now I'm fairly sure now the bug is in the font stream.


[-- Attachment #2: foo.doctored.pdf --]
[-- Type: application/pdf, Size: 8397 bytes --]

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


I finally found a tool to analyze CID fonts at
https://github.com/janpe2/CFFDump
I noticed two things:
1) the MKIX Top DICT INDEX doesn't contain /version, but the string is
   in the SID.  Unfortunately merely adding it to topdict in
   tablewriters.cff doesn't fix the printing bug.  But I'd still
   recommend doing so.

2) The Private DICT doesn't contain /StdHW /StdVW /StemSnapH /StemSnapV.
   Also BlueScale is 0.
   This should not matter for printing(?) but it explains why
   Adobe displays it differently! The hinting information is missing.

   Note that the code would copy this data but it's missing in the
   cffinfo already.

I'll attach both CFF dumps here, perhaps someone finds other issues.


[-- Attachment #4: font-0008.mkiv.dump --]
[-- Type: application/octet-stream, Size: 4829 bytes --]

% CFF Dump Output
% File: font-0008.cid


--------------------------------------------------------------------------------

Header (0x00000000):
    major: 1
    minor: 0
    hdrSize: 4
    offSize: 4

--------------------------------------------------------------------------------

Name INDEX (0x00000004):
  count: 1, offSize: 1
    [0]: (NVQBZA+LMRoman12-Regular)

--------------------------------------------------------------------------------

Top DICT INDEX (0x00000021):
  count: 1, offSize: 1
  [0] (0x00000026):
  <<
    /ROS << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >>
    /version (2.004)  % SID 392
    /Notice (Copyright 2003, 2009 B. Jackowski and J. M. Nowacki (on behalf of TeX users groups). This work is released under the GUST Font License --  see http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt for details.)  % SID 393
    /FullName (LMRoman12-Regular)  % SID 394
    /FamilyName (LMRoman12)  % SID 395
    /Weight (Normal)  % SID 396
    /UnderlinePosition -175
    /UnderlineThickness 44
    /FontBBox [-422 -280 1394 1127]
    /charset 411  % offset
    /CharStrings 448  % offset
    /CIDCount 117
    /FDArray 1921  % offset
    /FDSelect 440  % offset
    % ----- Following entries are missing, so they get default values: -----
    /isFixedPitch false  % default
    /ItalicAngle 0  % default
    /PaintType 0  % default
    /CharstringType 2  % default
    /FontMatrix [0.001 0 0 0.001 0 0]  % default
    /StrokeWidth 0  % default
    /CIDFontVersion 0  % default
    /CIDFontRevision 0  % default
    /CIDFontType 0  % default
  >>

--------------------------------------------------------------------------------

String INDEX (0x0000006b):
  count: 8, offSize: 2
    [0](SID = 391): (NVQBZA+LMRoman12-Regular)
    [1](SID = 392): (2.004)
    [2](SID = 393): (Copyright 2003, 2009 B. Jackowski and J. M. Nowacki (on behalf of TeX users groups). This work is released under the GUST Font License --  see http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt for details.)
    [3](SID = 394): (LMRoman12-Regular)
    [4](SID = 395): (LMRoman12)
    [5](SID = 396): (Normal)
    [6](SID = 397): (Adobe)
    [7](SID = 398): (Identity)

--------------------------------------------------------------------------------

Global Subr INDEX (0x00000199):
  count: 0
  <No global subroutines>

--------------------------------------------------------------------------------

Charset (0x0000019b):
  (format 0; [GID] = <CID>):
  ([0] = CID 0),
  [1]  = CID 28,  [2]  = CID 50,  [3]  = CID 55,  [4]  = CID 66,  
  [5]  = CID 67,  [6]  = CID 72,  [7]  = CID 77,  [8]  = CID 81,  
  [9]  = CID 82,  [10] = CID 88,  [11] = CID 98,  [12] = CID 105, 
  [13] = CID 109, [14] = CID 116, 

--------------------------------------------------------------------------------

FDSelect (0x000001b8):
  (format 3)
  FD #0 for GIDs 0...14


--------------------------------------------------------------------------------

Font DICT INDEX (a.k.a. FDArray) (0x00000781):
  count: 1, offSize: 1
  [0] (0x00000786):
  <<
    /FontName (NVQBZA+LMRoman12-Regular)  % SID 391
    /Private [59 1941]  % [size offset]
    % ----- Following entries are missing, so they get default values: -----
    /isFixedPitch false  % default
    /ItalicAngle 0  % default
    /UnderlinePosition -100  % default
    /UnderlineThickness 50  % default
    /PaintType 0  % default
    /CharstringType 2  % default
    /FontMatrix [0.001 0 0 0.001 0 0]  % default
    /FontBBox [0 0 0 0]  % default
    /StrokeWidth 0  % default
  >>

--------------------------------------------------------------------------------

CharStrings INDEX (0x000001c0):
  count: 15, offSize: 2
  <CharStrings dumping is disabled>

--------------------------------------------------------------------------------

CIDFont's Private DICTs:
  Private DICT for Font DICT #0 (0x00000795):
  <<
    /BlueValues [-21 0 431 446 665 675 683 704]  % Original delta values: [-21 21 431 15 219 10 8 21]
    /BlueScale 4.546E-2
    /BlueFuzz 0
    /StdHW 29
    /StdVW 65
    /StemSnapH [19 20 22 27 28 29 35 39 40 42 82 97]  % Original delta values: [19 1 2 5 1 1 6 4 1 2 40 15]
    /StemSnapV [22 49 63 65 71 76 79 81 83 87 93 97]  % Original delta values: [22 27 14 2 6 5 3 2 2 4 6 4]
    /defaultWidthX 490
    /nominalWidthX 643
    % ----- Following entries are missing, so they get default values: -----
    /BlueShift 7  % default
    /ForceBold false  % default
    /LanguageGroup 0  % default
    /ExpansionFactor 0.06  % default
    /initialRandomSeed 0  % default
  >>

--------------------------------------------------------------------------------

Local Subr INDEX for Font DICT #0:
  <No local subroutines>

--------------------------------------------------------------------------------

Info messages:
Info: This is a CIDFont.

% End of dump


[-- Attachment #5: font-0008.mkxl.dump --]
[-- Type: application/octet-stream, Size: 4053 bytes --]

% CFF Dump Output
% File: font-0008.cid


--------------------------------------------------------------------------------

Header (0x00000000):
    major: 1
    minor: 0
    hdrSize: 4
    offSize: 4

--------------------------------------------------------------------------------

Name INDEX (0x00000004):
  count: 1, offSize: 1
    [0]: (CLLXEY+LMRoman12-Regular)

--------------------------------------------------------------------------------

Top DICT INDEX (0x00000021):
  count: 1, offSize: 1
  [0] (0x00000026):
  <<
    /ROS << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >>
    /CIDCount 15
    /FamilyName (LMRoman12)  % SID 392
    /FullName (LMRoman12-Regular)  % SID 393
    /Weight (Normal)  % SID 394
    /FontBBox [-422 -280 1394 1127]
    /isFixedPitch false
    /ItalicAngle 0
    /UnderlinePosition -175
    /UnderlineThickness 44
    /CharstringType 2
    /FontMatrix [0.001 0 0 0.001 0 0]
    /StrokeWidth 0
    /CharStrings 257  % offset
    /charset 220  % offset
    /FDArray 1751  % offset
    /FDSelect 249  % offset
    /Private [23 1728]  % [size offset]
    % ----- Following entries are missing, so they get default values: -----
    /PaintType 0  % default
    /CIDFontVersion 0  % default
    /CIDFontRevision 0  % default
    /CIDFontType 0  % default
  >>

--------------------------------------------------------------------------------

String INDEX (0x00000085):
  count: 7, offSize: 1
    [0](SID = 391): (2.004)
    [1](SID = 392): (LMRoman12)
    [2](SID = 393): (LMRoman12-Regular)
    [3](SID = 394): (Normal)
    [4](SID = 395): (Adobe)
    [5](SID = 396): (Identity)
    [6](SID = 397): (CLLXEY+LMRoman12-Regular)

--------------------------------------------------------------------------------

Global Subr INDEX (0x000000da):
  count: 0
  <No global subroutines>

--------------------------------------------------------------------------------

Charset (0x000000dc):
  (format 0; [GID] = <CID>):
  ([0] = CID 0),
  [1]  = CID 1,  [2]  = CID 2,  [3]  = CID 3,  [4]  = CID 4,  
  [5]  = CID 5,  [6]  = CID 6,  [7]  = CID 7,  [8]  = CID 8,  
  [9]  = CID 9,  [10] = CID 10, [11] = CID 11, [12] = CID 12, 
  [13] = CID 13, [14] = CID 14, 

--------------------------------------------------------------------------------

FDSelect (0x000000f9):
  (format 3)
  FD #0 for GIDs 0...14


--------------------------------------------------------------------------------

Font DICT INDEX (a.k.a. FDArray) (0x000006d7):
  count: 1, offSize: 1
  [0] (0x000006dc):
  <<
    /FontName (CLLXEY+LMRoman12-Regular)  % SID 397
    /Private [23 1728]  % [size offset]
    % ----- Following entries are missing, so they get default values: -----
    /isFixedPitch false  % default
    /ItalicAngle 0  % default
    /UnderlinePosition -100  % default
    /UnderlineThickness 50  % default
    /PaintType 0  % default
    /CharstringType 2  % default
    /FontMatrix [0.001 0 0 0.001 0 0]  % default
    /FontBBox [0 0 0 0]  % default
    /StrokeWidth 0  % default
  >>

--------------------------------------------------------------------------------

CharStrings INDEX (0x00000101):
  count: 15, offSize: 2
  <CharStrings dumping is disabled>

--------------------------------------------------------------------------------

CIDFont's Private DICTs:
  Private DICT for Font DICT #0 (0x000006c0):
  <<
    /defaultWidthX 490
    /nominalWidthX 643
    /BlueValues [-21 0 431 446 665 675 683 704]  % Original delta values: [-21 21 431 15 219 10 8 21]
    /BlueScale 0
    /BlueFuzz 0
    % ----- Following entries are missing, so they get default values: -----
    /BlueShift 7  % default
    /ForceBold false  % default
    /LanguageGroup 0  % default
    /ExpansionFactor 0.06  % default
    /initialRandomSeed 0  % default
  >>

--------------------------------------------------------------------------------

Local Subr INDEX for Font DICT #0:
  <No local subroutines>

--------------------------------------------------------------------------------

Info messages:
Info: This is a CIDFont.

% End of dump


[-- Attachment #6: Type: text/plain, Size: 70 bytes --]


cu,
-- 
Leah Neukirchen  <leah@vuxu.org>  https://leahneukirchen.org

[-- Attachment #7: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2022-10-06 16:42 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03 17:17 Leah Neukirchen via ntg-context
2022-10-03 18:57 ` Leah Neukirchen via ntg-context
2022-10-05 16:02   ` Pablo Rodriguez via ntg-context
2022-10-05 21:25     ` Hans Hagen via ntg-context
2022-10-03 21:57 ` Hans Hagen via ntg-context
2022-10-03 22:34   ` Leah Neukirchen via ntg-context
2022-10-04  2:16 ` Angel M Alganza via ntg-context
2022-10-04  7:33   ` Hans Hagen via ntg-context
2022-10-04 10:53     ` Leah Neukirchen via ntg-context
2022-10-04 11:54       ` Hans Hagen via ntg-context
2022-10-04 12:35         ` Leah Neukirchen via ntg-context
2022-10-04 12:50           ` Hans Hagen via ntg-context
2022-10-04 12:54           ` Hans Hagen via ntg-context
2022-10-04 15:52             ` Leah Neukirchen via ntg-context
2022-10-04 16:29               ` Hans Hagen via ntg-context
2022-10-04 12:59           ` Hans Hagen via ntg-context
2022-10-04 15:44             ` Henning Hraban Ramm via ntg-context
2022-10-04 16:11               ` Hans Hagen via ntg-context
2022-10-04 17:23                 ` Henning Hraban Ramm via ntg-context
2022-10-04 11:59       ` Henning Hraban Ramm via ntg-context
2022-10-04 13:21         ` Angel M Alganza via ntg-context
2022-10-04 16:03           ` Henning Hraban Ramm via ntg-context
2022-10-04 16:09             ` Hans Hagen via ntg-context
2022-10-06 10:31               ` Ulrike Fischer via ntg-context
2022-10-06 11:23                 ` Hans Hagen via ntg-context
2022-10-06 12:42                   ` Leah Neukirchen via ntg-context
2022-10-06 14:23                     ` Hans Hagen via ntg-context
2022-10-06 16:42                       ` Leah Neukirchen via ntg-context [this message]
2022-10-09  6:03 ` Max Chernoff via ntg-context
2022-10-09 10:08   ` Hans Hagen via ntg-context
2022-10-11 19:07     ` Leah Neukirchen via ntg-context
2022-10-12  4:41       ` Aditya Mahajan via ntg-context
2022-10-12  4:56       ` Max Chernoff via ntg-context
2022-10-12 11:14         ` Leah Neukirchen via ntg-context
2022-10-12 22:50           ` Max Chernoff via ntg-context
2022-10-13 17:41             ` Pablo Rodriguez via ntg-context
2022-10-13 18:36               ` Henning Hraban Ramm via ntg-context
2022-10-13 20:35                 ` Hans Hagen via ntg-context
2022-10-13 20:32               ` Hans Hagen via ntg-context
2022-10-13 19:30       ` Willi Egger via ntg-context

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=87bkqohpjn.fsf@vuxu.org \
    --to=ntg-context@ntg.nl \
    --cc=leah@vuxu.org \
    /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).