Re: [NTG-context] devanagari is missing an accent in newest beta

2018-10-19 Thread Ulrike Fischer
Am Fri, 19 Oct 2018 11:36:48 +0200 schrieb Arthur Reutenauer:

>> Screenshots and code that show the difference and the missing accent
>> in the xelatex and context output are in this comment

>> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-431288932

>> the older (perfect) output is in a comment above
>> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-426978522
> 
>   The missing “accent” is a repha, a form of the consonant ra.  It seems
> to have been replaced by a middle dot, to the right of the base
> consonant.  I can’t be completely sure because it’s protruding into the
> next consonant so it’s almost indistinguishable from it, but I think
> that’s what happened.

Yes, good catch. there is a dot. But I'm wondering if I saw ghosts
when thinking that it worked before. I can't find no commit which
changes to the "right" output and also in a older context it is
wrong. 



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] devanagari is missing an accent in newest beta

2018-10-19 Thread Arthur Reutenauer
On Fri, Oct 19, 2018 at 10:50:14AM +0200, Ulrike Fischer wrote:
> Screenshots and code that show the difference and the missing accent
> in the xelatex and context output are in this comment
> 
> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-431288932
> 
> the older (perfect) output is in a comment above
> https://github.com/u-fischer/luaotfload/issues/9#issuecomment-426978522

  The missing “accent” is a repha, a form of the consonant ra.  It seems
to have been replaced by a middle dot, to the right of the base
consonant.  I can’t be completely sure because it’s protruding into the
next consonant so it’s almost indistinguishable from it, but I think
that’s what happened.

Best,

Arthur
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] what defines the font size?

2018-10-19 Thread Arthur Reutenauer
Luigi,

  Many thanks for this information-packed summary, it’s very uselful and
I even learned a thing or two :-)

Best,

Arthur
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] devanagari is missing an accent in newest beta

2018-10-19 Thread Ulrike Fischer
Disclaimer: I know nothing about devanagari, I can only describe
changes visually ...

I installed yesterday the newest context, and one of my examples of
devanagari is now missing an "accent". I'm rather confident that the
output was different before the update as I made screenshots when
testing this with luaotfload. 

The affected font siddhanta can be found here
http://svayambhava.blogspot.com/p/siddhanta-devanagariunicode-open-type.html

Screenshots and code that show the difference and the missing accent
in the xelatex and context output are in this comment

https://github.com/u-fischer/luaotfload/issues/9#issuecomment-431288932

the older (perfect) output is in a comment above
https://github.com/u-fischer/luaotfload/issues/9#issuecomment-426978522


-- 
Ulrike Fischer 
https://www.troubleshooting-tex.de/

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] what defines the font size?

2018-10-19 Thread luigi scarso
On Tue, Oct 16, 2018 at 7:48 PM Pablo Rodriguez  wrote:

>
> I tried to experiment (modifying TeX Gyre Pagella from 1000 to 
> UPM), but for some reason, I wasn’t able to load the font.
>

hm.
Weird.

Assuming  ttx from fontools
$> ttx texgyrepagella-regular.otf
$> cp texgyrepagella-regular.ttx texgyrepagella-regular-500.ttx
$> cp texgyrepagella-regular.ttx texgyrepagella-regular-2000.ttx

Then we can edit  the unitsPerEm tag:

texgyrepagella-regular-2000.ttx:
texgyrepagella-regular-500.ttx:

Also, better to  edit the names too:

texgyrepagella-regular-2000.ttx:
texgyrepagella-regular-2000.ttx:  
texgyrepagella-regular-2000.ttx:  

texgyrepagella-regular-500.ttx:
texgyrepagella-regular-500.ttx:  
texgyrepagella-regular-500.ttx:  

texgyrepagella-regular.ttx:
texgyrepagella-regular.ttx:  
texgyrepagella-regular.ttx:  

Then recompile the font
$>ttx texgyrepagella-regular-500.ttx
$>ttx texgyrepagella-regular-2000.ttx

and the following examples with context:

%%% test-500-1000-2000.tex
\nopdfcompression
\usemodule[fnt-10]
\starttext

{\tfd file:texgyrepagella-regular-500.otf}
\ShowCompleteFont{file:texgyrepagella-regular-500.otf}{10pt}{1}

{\tfd file:texgyrepagella-regular.otf}
\ShowCompleteFont{file:texgyrepagella-regular.otf}{10pt}{1}

{\tfd file:texgyrepagella-regular-2000.otf}
\ShowCompleteFont{file:texgyrepagella-regular-2000.otf}{10pt}{1}

\stoptext


%%% test-hello-500-1000-2000.tex
\nopdfcompression
\definefont[TestD][file:texgyrepagella-regular-500.otf at 10bp]
\definefont[Test][file:texgyrepagella-regular.otf at 10bp]
\definefont[TestMM][file:texgyrepagella-regular-2000.otf at 10bp]
\starttext
\startTEXpage
{\TestD Hello 500}
{\Test Hello 1000}
{\TestMM Hello 2000}
\stopTEXpage
\stoptext

(yes, we have "10pt" vs "10bp")

You should see that the texgyrepagella-regular-500.otf is bigger than
texgyrepagella-regular.otf
and  the texgyrepagella-regular-2000.otf is smaller than
texgyrepagella-regular.otf
This is ok: texgyrepagella-regular has unitsPerEm value="1000"
so changing *only* the unitsPerEm has an effect of scaling.

Consider the "M" :
$ grep 'name="M"' *ttx|grep mtx
texgyrepagella-regular-2000.ttx:
texgyrepagella-regular-500.ttx:
texgyrepagella-regular.ttx:

where "width" is the "advance width"  in  "font design units"
(it is the  """  distance the current text position shall move (by
translating text space) when the glyph is painted. """ , see the pdf
reference).

So in texgyrepagella-regular.ttx, M has a "width" of  946  on  1000
units,
in texgyrepagella-regular-500.ttx, M has a "width" of  946 on  500   that
looks  like 2x the width of M in regular
in texgyrepagella-regular-2000.ttx, M has a "width" of  946 on  2000  that
looks  like  0.5x the width of M in regular
--- under the assumption that we have changes *only* the value of
unitsPerEm.

unitsPerEm is a number that says that, well, "1em is made by 
values":
it is a dimensionless unit that  defines a "glyph space of (x,y) real
coordinates " ( not arbitrarily, there are implementation limits to respect
).
So, in principle we can say "Let's  start to design a font in a grid
1000x1000 of font design units" as well
"Let's start to design a font in a grid of 2048x2048 units".
In any case, at some point we have to translate these numbers from the
dimensionless "glyph space" to a dimensional "text space"
and this is done by the FontMatrix --- another set of numbers that we  can
choose arbitrarily, at least apparently.

Given an  unitsPerEm=1000, if we choose a FontMatrix =  [ 0.001 0 0 0.001 0
0 ]
then, for both horizontal and vertical dimensions, 1000 units in a "glyph
space" are 1000*0.001 = 1 Postscript point  in the "text space":
i.e 1000 units => 1 Postscript point = 1/72 inch ~ 0.0003528 m (1
Postscript point is 1bp in TeX and it's not exactly the same of 1pt).

When an application loads a font to typeset some text
it has to specify the size of the glyph in a dimensional unit , because in
the end everything must be rasterized on a  physical device
-- screen or  paper -- to be viewed .
In TeX, by saying "at 10pt"  we mean "for this font, multiply every
dimension in "text space" by 9.9626401"
(10pt are 9.9626401bp , ie 9.9626401 Postscript points).
The font designer should then explicitly says (in some doc) something like
"this font is for reading at 10pt"
or "this is for title at 18pt" or something  similar (of course he  means
Postscript points, not TeX points)
and from here we can have an idea of "design size" of the font.
So, if we have 1000 unitsPerEm,
a FontMatrix = [ 0.001 0 0 0.001 0 0 ],
and we choose 10bp for the actual text,
1000 units are 10bp, or 1em = 10bp

In the previous experiments we have left unchanged the FontMatrix:
texgyrepagella-regular-2000.ttx:  
texgyrepagella-regular-500.ttx:  
texgyrepagella-regular.ttx:  
as well as all the other dimensions.
In texgyrepagella-regular-500.ttx we have 500 unitsPerEm and hence
500 units in a "glyph space"