Re: [NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-10-19 Thread juh via ntg-context
Dear Pablo,

Am Sun, Oct 16, 2022 at 08:43:25PM +0200 schrieb Pablo Rodriguez via 
ntg-context:
> On 7/25/22 14:00, juh+ntg-context--- via ntg-context wrote:
> > [...]
> > They hint to LuaMetaTex as the cause of the problem. You can follow the
> > discussion here.
> >
> > https://bugzilla.mozilla.org/show_bug.cgi?id=1781022
> 
> Hi juh,
> 
> this should have been fixed in current latest. So I think it may be safe
> to close the issue.
> 
> Sorry, but I cannot access to my Mozilla account temporarily (and I
> think you may close your issue without having to ask administrators).

Thanks for the hint. I will test the new upload and close the bug.

A first look into pdfjs/firefox on my notebook is looking good.

Many thanks to our developers to fix this so quickly. 

juh

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-10-16 Thread Pablo Rodriguez via ntg-context
On 7/25/22 14:00, juh+ntg-context--- via ntg-context wrote:
> [...]
> They hint to LuaMetaTex as the cause of the problem. You can follow the
> discussion here.
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=1781022

Hi juh,

this should have been fixed in current latest. So I think it may be safe
to close the issue.

Sorry, but I cannot access to my Mozilla account temporarily (and I
think you may close your issue without having to ask administrators).

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
___


Re: [NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-26 Thread Pablo Rodriguez via ntg-context
On 7/25/22 20:19, luigi scarso via ntg-context wrote:
> On Mon, Jul 25, 2022 at 7:52 PM Pablo Rodriguez via ntg-context
> wrote:
>
> Sadly, as already reported, LuaTeX doesn’t work on Linux anymore.
>
> hm at least luatex on x86-64 is still ok, as far as  I know.

Luigi,

many thanks for your reply. I was totally wrong.

LuaTeX in LMTX is working fine. It was my fault.

I have just discovered that I wasn’t able to generate the format file,
because texlive-luatex is a dependency in Fedora.

"export PATH=~/context/tex/texmf-linux-64/bin" solves the clash of paths
and it allows to generate the format file.

Sorry for the noise and 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
___


Re: [NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-25 Thread luigi scarso via ntg-context
On Mon, Jul 25, 2022 at 7:52 PM Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:

>
> Sadly, as already reported, LuaTeX doesn’t work on Linux anymore.
>
>
hm at least luatex on x86-64 is still ok, as far as  I know.

-- 
luigi
___
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] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-25 Thread Hans Hagen via ntg-context

On 7/25/2022 7:52 PM, Pablo Rodriguez via ntg-context wrote:


Just in case it might help,
Hinting is optionally and not needed on todays high res screens anyway. 
I see no need to spend time of that at our end.


Hans

-
  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] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-25 Thread Pablo Rodriguez via ntg-context
On 7/25/22 14:00, juh+ntg-context--- via ntg-context wrote:
>
> I reported the bug to Mozilla and they answered very fast.
>
> Sadly up too now without a good solution.

Many thanks for the bug report.

> They hint to LuaMetaTex as the cause of the problem. You can follow the
> discussion here.

I would like to compare the LMTX output with the one from LuaTeX.

Sadly, as already reported, LuaTeX doesn’t work on Linux anymore.

> https://bugzilla.mozilla.org/show_bug.cgi?id=1781022

From the two questions from Jonathan Kew, HTML with TeX Gyre Heros is
displayed fine.

I extracted the font from the PDF output document (with a source
document similar to
https://mailman.ntg.nl/pipermail/ntg-context/2022/106302.html) with
"mutools extract", but some info may be missing and Firefox cannot use
it to display the HTML file.

I extracted the font with Fontforge and it was displayed perfectly fine.
But I guess Fontforge is adding some info when generating the OTF font
(font size is bigger: 4KB and 2.3KB when extracted with mutools).

I’m no font expert, but what astonishes me is that it isn’t clear
whether the font has lost the hinting information or not with LMTX
(sorry if I got this wrong).

I have no idea whether Identity-H may be preventing the FreeType
autohinter from working properly. But ft-view (from freetype-demos)
displays poorly the font extracted without FontForge (unlike the font
extracted with it). I attach the first font.

After switching hinting from on to auto, the autohinter displays the
font way better.

To reproduce the issue "ftview  20 font-0009.otf" and press "a".

Just in case it might help,

Pablo
Title: tgyre




Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa turpis, semper quis fringilla ut, viverra nec risus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec nunc lorem, sollicitudin vel sodales eget, vehicula nec mi. Proin ullamcorper rutrum nibh, at porttitor nunc euismod et. Donec faucibus nisi faucibus ipsum porttitor phare­tra. Sed elementum, lectus nec congue imperdiet, ipsum leo viverra nisi, sit amet commodo odio odio id nisl. Fusce sagittis lobortis nisi sed consectetur. Nam eges­tas, sem ut fermentum convallis, ipsum tellus venenatis augue, eget condimentum risus quam id erat. Sed metus dui, sollicitudin pharetra pellentesque sed, placerat eget augue. Mauris sodales pretium tortor vitae rutrum. Proin quam sem, lobortis tincidunt pretium vitae, feugiat eu lacus.




font-0009.otf
Description: font/otf
___
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] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-25 Thread juh+ntg-context--- via ntg-context


I reported the bug to Mozilla and they answered very fast.

Sadly up too now without a good solution.

They hint to LuaMetaTex as the cause of the problem. You can follow the 
discussion here.


https://bugzilla.mozilla.org/show_bug.cgi?id=1781022

juh
___
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] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-22 Thread Max Chernoff via ntg-context


> the firefox pdf viewer has problems with at least two sans serif
> fonts.
> 
> Using this mwe I get a bad display in ff with Gyre font and Alegreya
> Font.
> 

What do you mean by "bad display"? Are the fonts blurry, or are the
shapes all slightly distorted? Your test file displays fine on my
system.

> But there are many Firefox users out there who never use a real 
> pdf-viewer. I would like to show them a good result.

I've been using Firefox (and pdf.js) as my PDF viewer almost exclusively
for the past ~2 years, and I've been using ConTeXt LMTX for about the
same amount of time. I haven't noticed any font issues, so I suspect
that this issue is system-dependant. I've mostly been on Windows for the
past few years, but I'm now on Linux, and I haven't noticed any issues
with either.

> I have no idea if the difference is the cause of the bad display.
> 
> Luckily chrome based browsers shows the fonts without any flaws.

Ok, random guess time (so I may be waay off here):

I think that this is a hinting problem. The TeX Gyre fonts are all
professionally hinted, so what might be happening be that when ConTeXt
is subsetting the fonts, it is removing all of the hinting information,
while LibreOffice is keeping all of the hints. I've opened PDFs from
ConTeXt and LibreOffice in FontForge and the hints are still there, so I
don't think that this is the case, but maybe? The hinting format is also
wildly different between Type 1 and CFF/OTF, so maybe there is just a
bug in one of the font renderers. 

Chrome uses an internal backend to render all of its text, but Firefox
uses system-dependant backends (I think). Most renderers these days will
autohint unhinted fonts using an embedded FreeType so that they still
display somewhat-well. You can adjust the "hinting strength" in
FreeType, which I would guess would usually be set to the maximum. So
LibreOffice includes the font hints and things display fine, and Chrome
uses a bundled FreeType with maximum hinting so things display fine.

Firefox on Windows would need to bundle its own FreeType since there
isn't a system one, and it renders fine in my experience. But Firefox on
Linux would just use the system FreeType. I think that you are on Linux
(?) and the default in Linux is for minimal/no hinting. Now, I've
specifically enabled maximum hinting on my system, and I'm not seeing
any problems with rendering. If you're using Gnome, can you try enabling
"full" hinting in Gnome Tweaks, reboot, then test again? No idea how to
configure this with other DEs, but I'm sure that it's possible. 

Another related guess is that older versions of FreeType maybe had a bug
with parsing/displaying hints. I think that Chrome bundles its own
FreeType which would be recent, but if you're using Firefox on Linux, it
is probably using the system FreeType library. If you're on an older LTS
distro, then the system FreeType may be really old and buggy.

If you're using macOS, I can't really help you too much except for to
say that text rendering on macOS is usually pretty bad unless you have a
really high resolution screen.

So those are my random guesses. Maybe one of them is helpful somehow.

-- 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] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-22 Thread Pablo Rodriguez via ntg-context
On 7/22/22 12:37, juh+ntg-context--- via ntg-context wrote:
> Dear all,
>
> the firefox pdf viewer has problems with at least two sans serif fonts.
> [...]
>
> Where Libreoffice has type "Type 1", lmtx has "CID Type 0C".
>
> Where Libreoffice has encoding "Builtin", lmtx has "Identity-H".
>
> I have no idea if the difference is the cause of the bad display.

Dear Jan Ulrich,

it may be the font type, the enconding (or who knows what).

> Any ideas how I can achieve this?

I’d rather report the issue (attaching both PDF documents and both
outputs from pdffonts) at https://github.com/mozilla/pdf.js/issues/new.

I reported an issue with PDF.js not displaying the cover of
http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf.

The day after my report the fix was merged.

Just in case it may 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
___


[NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)

2022-07-22 Thread juh+ntg-context--- via ntg-context

Dear all,

the firefox pdf viewer has problems with at least two sans serif fonts.

Using this mwe I get a bad display in ff with Gyre font and Alegreya Font.

%\definefontfamily[mainfont][sans][AlegreyaSans]
\definefontfamily[mainfont][sans][texgyreheros]
\setupbodyfont  [mainfont,12pt]
\startdocument
  \starttext
  \input lorem
\stoptext
\stopdocument

When I create a pdf from LibreOffice with these fonts I have a good display.

pdffonts shows different font inclusion:


pdffonts libreoffice.pdf
name type  encoding 
emb sub uni object ID
 -  
--- --- --- -
BA+TeXGyreHeros-Regular  Type 1Builtin 
yes yes yes  9  0


pdffonts mwe.pdf
name type  encoding 
emb sub uni object ID
 -  
--- --- --- -
SOVKKO+TeXGyreHeros-Regular  CID Type 0C   Identity-H 
yes yes yes  1  0



Where Libreoffice has type "Type 1", lmtx has "CID Type 0C".

Where Libreoffice has encoding "Builtin", lmtx has "Identity-H".

I have no idea if the difference is the cause of the bad display.

Luckily chrome based browsers shows the fonts without any flaws.

But there are many Firefox users out there who never use a real 
pdf-viewer. I would like to show them a good result.


Any ideas how I can achieve this?

juh

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