Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-11 Thread Max Chernoff via ntg-context
Hi Leah,


> > Leah and I are zooming in on the issue. It might relate to wrong font
> > matrix default behavior in the pdf printer driver, and GS got a fix
> > for that long ago, so maybe old printers with not-updated drivers can
> > be affected.
> >
> > Once we're confident that we can catch it Leah (who does the low level
> > introspective testing with viewers, printers and tools) likely will
> > report on it and there will be a test file for users to test if what
> > we do is okay before we apply the safeguard.
> 
> There's a write up now on the issue:
> https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-debugging-of-pdf-rendering-in-printers.html

Great write up! I was expecting the issue to be something quite simple,
but it's actually fairly complicated. Especially considering that the
issue only happens with a few printer models, I'm pretty impressed that
you managed to find the problem. At least the fix appears quite easy.

Seeing that you're modifying the font encoding, could you perhaps
reconsider supporting hinting in LMTX? 

   https://mailman.ntg.nl/pipermail/ntg-context/2022/106311.html

Even with a high resolution screen, I can still see a difference, and
the issue can show up in print too:

   
   https://graphicdesign.stackexchange.com/q/5874
   
I'm fairly confident that these issues are all hinting-related:

   https://mailman.ntg.nl/pipermail/ntg-context/2022/106874.html
   https://mailman.ntg.nl/pipermail/ntg-context/2022/105212.html
   
Considering that all of the fonts included with ConTeXt are hinted, it
seems like a shame to not include any of that data in the generated
PDFs.

Thanks,
-- Max
___
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
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-11 Thread Aditya Mahajan via ntg-context
On Tue, 11 Oct 2022, Leah Neukirchen via ntg-context wrote:

> Hans Hagen via ntg-context  writes:

> > Once we're confident that we can catch it Leah (who does the low level
> > introspective testing with viewers, printers and tools) likely will
> > report on it and there will be a test file for users to test if what
> > we do is okay before we apply the safeguard.
> 
> There's a write up now on the issue:
> https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-debugging-of-pdf-rendering-in-printers.html

Wow, that was quite a ride. Kudos on getting to the bottom of this!

Aditya
___
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
___


Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers

2022-10-11 Thread Leah Neukirchen via ntg-context
Hans Hagen via ntg-context  writes:

> On 10/9/2022 8:03 AM, Max Chernoff via ntg-context wrote:
>> Hi all,
>> 
>>> I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11.
>>>
>>> Here's a tiny test document, I disabled PDF compression but it also
>>> doesn't work with the default settings.
>>>
>>> \setupbackend[level=0,compresslevel=0]
>>> \starttext
>>> Just a line of text.
>>> \stoptext
>>>
>>> When I print this "directly" (i.e. sending the raw PDF to the printer)
>>> on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page.
>> Just to add some more data points, I tested the attached MkXL file
>> on
>> two printers, and the file printed perfectly on both.
>> Printer 1:
>> Brother HL-3170CDW
>> Printed via running "cat test.mkxl.pdf | nc Colour-Printer.local 9100"
>> Printer 2:
>> HP M227f LaserJet
>> Printed from the PDF file on a USB stick
>> Neither printer is anything fancy; they're both fairly
>> inexpensive home
>> laser printers. I've got a much older Brother laser printer that I may be
>> able to test with next week.
>> Sorry I can't be of more help.
> Leah and I are zooming in on the issue. It might relate to wrong font
> matrix default behavior in the pdf printer driver, and GS got a fix
> for that long ago, so maybe old printers with not-updated drivers can
> be affected.
>
> Once we're confident that we can catch it Leah (who does the low level
> introspective testing with viewers, printers and tools) likely will
> report on it and there will be a test file for users to test if what
> we do is okay before we apply the safeguard.

There's a write up now on the issue:
https://leahneukirchen.org/blog/archive/2022/10/50-blank-pages-or-black-box-debugging-of-pdf-rendering-in-printers.html

-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
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
___


Re: [NTG-context] \quotation, protrusion and linebreaking

2022-10-11 Thread Leah Neukirchen via ntg-context
Henning Hraban Ramm via ntg-context  writes:

> Am 11.10.22 um 20:00 schrieb Leah Neukirchen via ntg-context:
>> Hello,
>> I noticed the following problem:
>> \showframe
>> \startluacode
>>fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
>> \stopluacode
>> \definefontfeature[default][default][protrusion=pure]
>> \setupalign[hanging]
>> \starttext
>> This text is unquoted.
>> “This text is quoted manually.”
>> \quotation{This text is quoted by a macro.}
>> This is a very long line followed by a nice linebreak, very
>> supercalifragilisticexpialidocious.
>> This is a very long line followed by an ugly linebreak, not
>> \quotation{supercalifragilisticexpialidocious}
>> \stoptext
>> The macro-quoted text is not protruded.  I fixed this locally with a
>> macro
>> \def\q#1{\protrusionboundary1\quotation{#1}}
>> Should this be default?
>> But the missing hyphenation I have to add myself with \-.  Ideas?
>
> Try
> \setupdelimitedtext[quotation][method=font]

That fixes both issues, thanks!

Not sure where I should have learned this exists, however. ;)

-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
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
___


Re: [NTG-context] \quotation, protrusion and linebreaking

2022-10-11 Thread Henning Hraban Ramm via ntg-context

Am 11.10.22 um 20:00 schrieb Leah Neukirchen via ntg-context:

Hello,

I noticed the following problem:


\showframe

\startluacode
   fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
\stopluacode

\definefontfeature[default][default][protrusion=pure]
\setupalign[hanging]

\starttext

This text is unquoted.

“This text is quoted manually.”

\quotation{This text is quoted by a macro.}

This is a very long line followed by a nice linebreak, very 
supercalifragilisticexpialidocious.

This is a very long line followed by an ugly linebreak, not 
\quotation{supercalifragilisticexpialidocious}

\stoptext


The macro-quoted text is not protruded.  I fixed this locally with a macro
\def\q#1{\protrusionboundary1\quotation{#1}}
Should this be default?

But the missing hyphenation I have to add myself with \-.  Ideas?


Try
\setupdelimitedtext[quotation][method=font]

Hraban

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


[NTG-context] \quotation, protrusion and linebreaking

2022-10-11 Thread Leah Neukirchen via ntg-context
Hello,

I noticed the following problem:


\showframe

\startluacode
  fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
\stopluacode

\definefontfeature[default][default][protrusion=pure]
\setupalign[hanging]

\starttext

This text is unquoted.

“This text is quoted manually.”

\quotation{This text is quoted by a macro.}

This is a very long line followed by a nice linebreak, very 
supercalifragilisticexpialidocious.

This is a very long line followed by an ugly linebreak, not 
\quotation{supercalifragilisticexpialidocious}

\stoptext


The macro-quoted text is not protruded.  I fixed this locally with a macro
\def\q#1{\protrusionboundary1\quotation{#1}}
Should this be default?

But the missing hyphenation I have to add myself with \-.  Ideas?

-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
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
___


Re: [NTG-context] How to make something appear to the right of every paragraph?

2022-10-11 Thread Hans Hagen via ntg-context

On 10/10/2022 12:12 AM, Joel via ntg-context wrote:
I'd like to add some area for readers to write in the margins of some 
text. This would leave three lines, like this to the right of the text.


__
__
__

The passage would take up about the left 60% of the text and the margin 
note space about 30% of textwidth, so no need to use the margins.


Though its easy for me to implement this code using some \thinrules and 
manually dropping macros in the text, is there some way ConTeXt can be 
told to just add them to right of every paragraph (at the start of the 
paragraph)?


Sample:

This is some text  
that is written in        
the passage and      
you can see the th-
ree lines to the right.
The text in the para-
graph continues even
though there are
just three lines to
the right.

Here is another par-    
agraph.                        
       

Here is yet another    
paragraph. You can    
see it also has the 
three liens.

This is just for a segment of the book, not every paragraph in the book.


\starttext

\def\StartHack
 {\margintext
   [location=right,style=]
   {\thinrules[n=3]}}

\def\StopHack
 {\par \ifnum\prevgraf<3
\blank[\the\numexpr4-\prevgraf\relax*line]
  \fi}

\StartHack \input tufte \StopHack

\StartHack test test \StopHack

\StartHack test test \StopHack

\stoptext



--

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


Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-11 Thread Gerion Entrup via ntg-context
Am Sonntag, 9. Oktober 2022, 17:33:09 CEST schrieb Leah Neukirchen via 
ntg-context:
> So please: Try to preview and then try to print the attached PDF;
> and report back if either preview or printout does not look like
> the attached reference PNG image (i.e. something is missing,
> the fonts look different, or have wrong relative size.)

Okular, MuPDF and pdf.js (Firefox) on Linux look fine.
Gimp and Krita also look fine (but I think they are both using poppler).
LibreOffice Draw does not (font sizes are wrong). However, this is not directly 
a PDF viewer, so I'm pretty sure it can be ignored.

Best,
Gerion




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


Re: [NTG-context] TOC colors and in-page anchors

2022-10-11 Thread Sylvain Hubert via ntg-context
(heartbeat packet)

I think some kind of modern issue tracker on e.g.
https://github.com/contextgarden/context-mirror would be generally helpful.

On Wed, 28 Sept 2022 at 23:31, Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:

> On 9/28/22 12:20, Sylvain Hubert via ntg-context wrote:
> > Thanks for the pointers, but unfortunately I cannot reproduce the second
> > fix with either the system pdf viewer or the browser one.
>
> Hi Sylvain,
>
> it seems that ConTeXt is basically ignoring "focus=standard" in lists.
>
> Compare both links here:
>
>   \setupinteraction[state=start,
> color=darkred,
> contrastcolor=darkred,
> focus=standard]
>   \starttext
>   \completecontent
>   \section[a]{b}
>   \about[a]
>   \stoptext
>
> And this is a regression. I think it was introduced in latest from
> 2022.07.06 21:42, since latest from 2022.05.11 11:36 has no issue with
> this.
>
> Hans, could you see what preventing this from working as expected?
>
> Many thanks for your help,
>
> Pablo
>
> ___
> 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
>
> ___
>
___
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
___