Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_fallback for greek/cyrillic Glyphs both regular and italic #294

Open
urshofer opened this issue Jan 7, 2025 · 0 comments
Open

add_fallback for greek/cyrillic Glyphs both regular and italic #294

urshofer opened this issue Jan 7, 2025 · 0 comments

Comments

@urshofer
Copy link

urshofer commented Jan 7, 2025

I'm stuck with the following problem:

Got the following fallback defined:


\directlua {
	luaotfload.add_fallback
		("myfallback", {
			"NotoSans:mode=harf;script=grek;",
			"NotoSans:mode=harf;script=cyrl;",
			"NotoSansItalic:style=Italic;mode=harf;script=grek;",
			"NotoSansItalic:style=Italic;mode=harf;script=cyrl;",			
			"NotoSansBengali:mode=harf;script=bng2",
			"Noto Sans CJK SC:mode=harf;script=hani;",
			"Noto Sans CJK JP:mode=harf;script=kana;",
			"NotoColorEmoji:mode=harf;",
			"Harmattan:mode=harf;script=arabic;"
		})
}

using it like:

\newfontfamily\Diatype{ABCDiatype}[
	Extension   = .otf,
	UprightFont = *-Regular,
  	BoldFont 	= *-Bold,
	ItalicFont  = *-RegularItalic,
	BoldItalicFont  = *-BoldItalic,		  
	RawFeature=+onecb;+sixcb;+ninecb;+ss01,
	RawFeature={fallback=myfallback}
 ]

Missing greek glyphs are correctly substituted unless typeset as emphasized text \emph{…}.

How is it possible to add a fallback for Italic as well?

A fallback like this works as well, but sets all greek glyphs to italic, which is of course correct:

\directlua {
	luaotfload.add_fallback
		("myfallback", {
			"NotoSansItalic:mode=harf;script=grek;",
			"NotoSansItalic:mode=harf;script=cyrl;",			
			"NotoSansBengali:mode=harf;script=bng2",
			"Noto Sans CJK SC:mode=harf;script=hani;",
			"Noto Sans CJK JP:mode=harf;script=kana;",
			"NotoColorEmoji:mode=harf;",
			"Harmattan:mode=harf;script=arabic;"
		})
}

Is there a switch, an option I'm missing?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant