From: Ulrike Fischer <news3@nililand.de>
To: ntg-context@ntg.nl
Subject: Problems with ttc-fonts
Date: Fri, 29 Apr 2016 09:51:36 +0200 [thread overview]
Message-ID: <1qmochor1mtt1.dlg@nililand.de> (raw)
I was playing with the addfeature handler mentioned here
https://mailman.ntg.nl/pipermail/ntg-context/2016/083952.html and
run into a problem with ttc-fonts:
\starttext
\directlua{
fonts.handlers.otf.addfeature {
name = "oneb",
{
type = "substitution",
data = {
["1"] = "period",
},
},
"feature test",
}
}
\font\test= name:LatinModernRoman:+oneb \test
1234567890
\font\test= name:cambria:+oneb \test
1234567890
\stoptext
This gives:
.234567890
p234567890
So with latin modern it works fine, while with cambria the first
letter of the substituation is used.
The used fonts are:
filename=lmroman10-bold.otf filetype=otf format=otf
foundname=D:/context-minimals/context/tex/texmf/fonts/opentype/public/lm/lmroman10-bold.otf
usedmethod=database
filename=c:/windows/fonts/cambria.ttc format=ttc
foundname=c:/windows/fonts/cambria.ttc usedmethod=direct
(I have no idea why the bold version of lm is used, but I don't care
now)
Looking at the tma I see one difference between both fonts:
glyphs in cambria have no "name". A typical entry looks like this
[46]={
["boundingbox"]={ 109, 0, 311, 232 },
["index"]=484,
["unicode"]=46,
["width"]=420,
},
while with latin modern it looks like this:
[46]={
["boundingbox"]={ 81, 0, 237, 156 },
["index"]=88,
["name"]="period",
["unicode"]=46,
["width"]=319,
},
Is is normal that glyph of ttc-fonts have no name data? If yes how
should one do substituations in such fonts?
--
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2016-04-29 7:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 7:51 Ulrike Fischer [this message]
2016-04-29 8:37 ` Hans Hagen
2016-04-29 9:25 ` Ulrike Fischer
2016-05-01 7:48 ` Hans Hagen
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=1qmochor1mtt1.dlg@nililand.de \
--to=news3@nililand.de \
--cc=ntg-context@ntg.nl \
/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).