ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: Fallback fails for Linux Libertine O to Junicode over private area, debugging?
Date: Fri, 7 Jan 2022 18:10:39 +0100	[thread overview]
Message-ID: <5330d88e-5641-3c9f-7c97-a944153796dc@xs4all.nl> (raw)
In-Reply-To: <m0y23ra7fo.fsf@virginia.edu>

On 1/7/2022 4:18 PM, J. P. Ascher via ntg-context wrote:
> Hi, all,
> 
> I'm a long time lurker (on gmane), first time poster. First, thank you
> all, very much, for your excellent work and superb community.
> ConTeXt has become a critical part of my academic writing and integral
> to my research.  I'm not exaggerating when I say it changed how
> I thought about texts and became a major source for my dissertation
> work.  Thank you!
> 
> I'm trying to get a typescript for setting a text in Libertine with
> Junicode fallbacks for characters in MUFI, in the private use area.
> For some reason Libertine roman will not fallback no matter what
> I do. However Libertine italic will.  I can also work around it by using
> Junicode as a base and forcing fallback to Libertine.
> 
> My question is: why?  What's wrong with Libertine roman?  Or my approach?
> 
> My hypothesis is that there's something about `LinLibertine_R.otf`
> that's not quite right.  I looked in FontForge, but couldn't
> spot anything.
> 
> Does anyone have a suggestion as to another place to look?  Or something
> I'm overlooking?
> 
> Minimal example (attached too, if it comes through):
> 
> ```
> \definefontfeature[default][default][script=latn]
> 
> 
> % Libertine with a Junicode fallback, lib-fb-jun
> 
> \definefontfallback[junicodefallback][name:Junicode][privateusearea][check=yes,force=no]
> 
> \starttypescript [serif] [lib-fb-jun]
>    \definefontsynonym [Libertine-Roman]     [file:linlibertiner]
>    \definefontsynonym [Libertine-Slanted]  [file:linlibertineri]  % works fine
> \stoptypescript
>   
> \starttypescript [serif] [lib-fb-jun] [name]
>    \definefontsynonym [Serif]            [Libertine-Roman]   [features=default,fallbacks=junicodefallback]
>    \definefontsynonym [SerifSlanted]     [Libertine-Slanted] [features=default,fallbacks=junicodefallback]
> \stoptypescript
>   
> \starttypescript [lib-fb-jun]
>    \definetypeface [lib-fb-jun] [rm] [serif] [lib-fb-jun] [default]
> \stoptypescript
> 
> 
> % Junicode with Libertine as a fallback, preferring Libertine, jun-pr-lib
> % this hack does what I want the above to do
> 
> \definefontfallback[preferlibertine][name:linlibertineo][0-FFFFF][check=yes,force=yes]
> 
> \starttypescript[serif] [jun-pr-lib]
>     \definefontsynonym [JunicodeRoman] [name:Junicode]
> \stoptypescript
> 
> \starttypescript[serif] [jun-pr-lib] [name]
>     \definefontsynonym [Serif] [JunicodeRoman] [fallbacks=preferlibertine]
> \stoptypescript
> 
> \starttypescript [jun-pr-lib]
>    \definetypeface [jun-pr-lib] [rm] [serif] [jun-pr-lib] [default]
> \stoptypescript
> 
> 
> % some tracking stuff
> 
> \enabletrackers[fonts.missing=replace]
> \enabledirectives[logs.errors]
> 
> 
> % text, we use lib-fb-jun first, then jun-pr-lib
> 
> \starttext
> \setupbodyfont[lib-fb-jun]
> 
> {\em emph. lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)}
> 
> lib-fb-jun: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs)  % <- fallback fails here
> 
> \switchtobodyfont[jun-pr-lib]
> 
> jun-pr-lib: \Uchar61125 \char64259 \utfchar{"eec5} (three glyphs) % <- works
> 
> \stoptext
> ```
> 
> Any ideas?
when you use a complex font (in this case with lots of ligatures) doing 
a fallback can interfere with these features especially when they have 
been put in the private areas which are basically 'undefined'

you're accessing an st ligature directly but normally you will do that 
by enabling a font feature

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 / 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
___________________________________________________________________________________

  parent reply	other threads:[~2022-01-07 17:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 15:18 J. P. Ascher via ntg-context
2022-01-07 16:52 ` Youssef Cherem via ntg-context
2022-01-07 16:59   ` J. P. Ascher via ntg-context
2022-01-07 18:33     ` Hans Hagen via ntg-context
2022-01-07 17:10 ` Hans Hagen via ntg-context [this message]
2022-01-07 18:55   ` J. P. Ascher via ntg-context
2022-01-07 19:19     ` Hans Hagen via ntg-context
2022-01-07 21:39       ` J. P. Ascher via ntg-context
2022-01-07 22:01         ` Why mtxrun fails ? Jean-Pierre Delange via ntg-context
2022-01-07 22:40           ` Otared Kavian via ntg-context
2022-01-07 23:00           ` Youssef Cherem via ntg-context
2022-01-08  0:42             ` Jean-Pierre Delange via ntg-context
2022-01-08  0:48               ` Jean-Pierre Delange via ntg-context
2022-01-08  0:45             ` Jean-Pierre Delange via ntg-context
2022-01-08  8:05           ` juh via ntg-context
2022-01-08 10:42         ` Fallback fails for Linux Libertine O to Junicode over private area, debugging? Hans Hagen via ntg-context
2022-01-07 18:23 ` Hans Hagen via ntg-context
2022-01-07 19:11   ` J. P. Ascher 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=5330d88e-5641-3c9f-7c97-a944153796dc@xs4all.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@xs4all.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).