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

problems with Spacing Modifier Letters and Combining Diacritical Marks #13

Open
jonorthwash opened this issue Apr 3, 2016 · 10 comments

Comments

@jonorthwash
Copy link

I just posted this question on the LaTeX stackexchange before finding the ucharclasses repo. Am I right that the issue I encountered is a bug or limitation, or am I doing something wrong?

@Pomax
Copy link
Owner

Pomax commented Apr 3, 2016

hmm... if it's not too much trouble, could you add those minimal verifiable complete examples to this bug (ideally, one per comment)? That'll make it easier to check and track for me.

@jonorthwash
Copy link
Author

  1. Conventional approach.
\documentclass{article}

\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage[Latin, Phonetics, Diacritics, SpacingModifierLetters]{ucharclasses}
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\newfontfeature{IPA}{+mgrk}
\setmainfont[IPA]{DejaVu Sans}
\newfontfamily\dejavuserif[IPA]{DejaVu Serif}

\setTransitionsFor{IPAExtensions}{\dejavuserif}{\normalfont}
\setTransitionsFor{CombiningDiacriticalMarks}{\dejavuserif}{\normalfont}
\setTransitionsFor{SpacingModifierLetters}{\dejavuserif}{\normalfont}

\begin{document}
\thispagestyle{empty}

thaaw [tʰɑɑɯ] [tɑɑɯ] [tʰɑ́ɑɯ] [tɑ́ɑɯ] thaaw

\end{document}

@jonorthwash
Copy link
Author

(2) Based on this question:

\documentclass{article}

\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage[Latin, Phonetics, Diacritics, SpacingModifierLetters]{ucharclasses}
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\newfontfeature{IPA}{+mgrk}
\setmainfont[IPA]{DejaVu Sans}
\newfontfamily\dejavuserif[IPA]{DejaVu Serif}

\setTransitionTo{IPAExtensions}{\dejavuserif}
\setTransitionFrom{IPAExtentions}{\normalfont}
\setTransitionTo{CombiningDiacriticalMarks}{\dejavuserif}
\setTransitionFrom{CombiningDiacriticalMarks}{\normalfont}
\setTransitionTo{SpacingModifierLetters}{\dejavuserif}
\setTransitionFrom{SpacingModifierLetters}{\normalfont}

\begin{document}
\thispagestyle{empty}

thaaw [tʰɑɑɯ] [tɑɑɯ] [tʰɑ́ɑɯ] [tɑ́ɑɯ] thaaw

\end{document}

@jonorthwash
Copy link
Author

(3) Based on this question:

\documentclass{article}

\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage[Latin, Phonetics, Diacritics, SpacingModifierLetters]{ucharclasses}
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\newfontfeature{IPA}{+mgrk}
\setmainfont[IPA]{DejaVu Sans}
\newfontfamily\dejavuserif[IPA]{DejaVu Serif}

\setTransitionsFor{IPAExtensions}{\begingroup\dejavuserif}{\endgroup}
\setTransitionsFor{CombiningDiacriticalMarks}{\begingroup\dejavuserif}{\endgroup}
\setTransitionsFor{SpacingModifierLetters}{\begingroup\dejavuserif}{\endgroup}

\begin{document}
\thispagestyle{empty}

thaaw [tʰɑɑɯ] [tɑɑɯ] [tʰɑ́ɑɯ] [tɑ́ɑɯ] thaaw

\end{document}

@jonorthwash
Copy link
Author

(4) Based on this question:

\documentclass{article}

\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage[Latin, Phonetics, Diacritics, SpacingModifierLetters]{ucharclasses}
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\newfontfeature{IPA}{+mgrk}
\setmainfont[IPA]{DejaVu Sans}
\newfontfamily\dejavuserif[IPA]{DejaVu Serif}

\makeatletter
\setTransitionsFor{IPAExtensions}
    {\let\curfamily\f@family\let\curshape\f@shape\let\curseries\f@series\dejavuserif}
    {\fontfamily{\curfamily}\fontshape{\curshape}\fontseries{\curseries}\selectfont}
\setTransitionsFor{SpacingModifierLetters}
    {\let\curfamily\f@family\let\curshape\f@shape\let\curseries\f@series\dejavuserif}
    {\fontfamily{\curfamily}\fontshape{\curshape}\fontseries{\curseries}\selectfont}
\setTransitionsFor{CombiningDiacriticalMarks}
    {\let\curfamily\f@family\let\curshape\f@shape\let\curseries\f@series\dejavuserif}
    {\fontfamily{\curfamily}\fontshape{\curshape}\fontseries{\curseries}\selectfont}

\makeatother

\begin{document}
\thispagestyle{empty}

thaaw [tʰɑɑɯ] [tɑɑɯ] [tʰɑ́ɑɯ] [tɑ́ɑɯ] thaaw

\end{document}

@Pomax
Copy link
Owner

Pomax commented Apr 3, 2016

thanks! I'll try to see what's going on with this hopefully today

@jonorthwash
Copy link
Author

Any updates on this? Ulrike Fischer added a comment to the stackexchange question that suggests both a place to look regarding the issue and a point that suggests that the desired behaviour may be hard to define in the first place.

@Pomax
Copy link
Owner

Pomax commented Apr 14, 2016

I've unfortunately not had any time to look at this yet, and might not get to it for at least another few days =(

@jonorthwash
Copy link
Author

Understood. I'll keep an eye out for whatever you find when you're able to.

@Shreeshrii
Copy link
Contributor

I am having similar issues with using combining marks in DevanagariExtended and VedicExtensions range with devanagari and other Indian script fonts which do not have these characters.

Some of the approaches above show the combining mark separately - with dotted circle.

The only approach that has worked correctly is when the combining mark is surrounded by uccoff and uccon - eg. ठ\uccoff{\fontspec{Siddhanta}᳚}\uccon
ठ\uccoff{\fontspec{Siddhanta}꣱}\uccon

Siddhanta font supports these combining marks not available in other fonts - http://svayambhava.blogspot.in/p/siddhanta-devanagariunicode-open-type.html

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

No branches or pull requests

3 participants