Xetex support for .otf features












5














In the .otf fonts where they are present, the Contextual Alternate (calt) and Localized Forms (locl) functions work fine in LibreOffice.



Experiment: I create a quoteright.fr glyph with a large bearing and impose a calt because quoteright glyph in Italian and in French is replaced by quoteright.fr glyph.



With LibreOffice the difference is evident: for the first line I set the Italian language, for the second line the English language (without bearing):



enter image description here



Instead with Xetex I can not enable these functions.



If I do not specify anything in the font features, the contextual substitution rule does not work.



If I enter Contextuals = Alternate I receive the message:



Package fontspec Warning: OpenType feature 'Contextuals = Alternate' (calt) not
(fontspec) available for font 'GaramondPremPro' with script
(fontspec) 'Latin' and language 'Default'.


and again the contextual replacement rule does not work.



Here is Xetex (first line in Italian, second in English



enter image description here



with the following code:



documentclass {article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}
end {document}


What can you depend on? Is there an error or a lack in my code?



Thank you



PS



otfinfo -f recognizes only system-wide features, and not localized ones (neither calt nor locl), that are also present in the font if I check it with FontLab or FontForge:



samiel@darkstar:~/work$ otfinfo --features font.otf



aalt    Access All Alternates
c2sc Small Capitals From Capitals
cpsp Capital Spacing
dnom Denominators
frac Fractions
kern Kerning
liga Standard Ligatures
lnum Lining Figures
numr Numerators
onum Oldstyle Figures
pnum Proportional Figures
smcp Small Capitals
sups Superscript
tnum Tabular Figures
zero Slashed Zero


PS2



I tried various possibilities. The following one:



documentclass{article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
%setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}

end{document}


produces the calt all over the document, not only for Italian and French languages (as in the font localized calt rule).



If I set



setmainfont[Ligatures=TeX,Numbers=OldStyle,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}


the replacement is never produced



Added answer to wrong question:



I tried various possibilities. The following one:



documentclass{article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
%setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}

end{document}


produces the calt all over the document, not only for Italian and Frenc (as inthe font cal rule.



If I set



setmainfont[Ligatures=TeX,Numbers=OldStyle,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}


the replacement is never produced










share|improve this question




















  • 1




    did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?
    – Ulrike Fischer
    5 hours ago










  • Yes, but nothing chages. It takes general font settings and not calt
    – user41063
    5 hours ago










  • Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.
    – Ulrike Fischer
    4 hours ago










  • I happens with all other otf I tried
    – user41063
    4 hours ago






  • 1




    If you know a free font which can be used for tests, add the info to the question.
    – Ulrike Fischer
    4 hours ago
















5














In the .otf fonts where they are present, the Contextual Alternate (calt) and Localized Forms (locl) functions work fine in LibreOffice.



Experiment: I create a quoteright.fr glyph with a large bearing and impose a calt because quoteright glyph in Italian and in French is replaced by quoteright.fr glyph.



With LibreOffice the difference is evident: for the first line I set the Italian language, for the second line the English language (without bearing):



enter image description here



Instead with Xetex I can not enable these functions.



If I do not specify anything in the font features, the contextual substitution rule does not work.



If I enter Contextuals = Alternate I receive the message:



Package fontspec Warning: OpenType feature 'Contextuals = Alternate' (calt) not
(fontspec) available for font 'GaramondPremPro' with script
(fontspec) 'Latin' and language 'Default'.


and again the contextual replacement rule does not work.



Here is Xetex (first line in Italian, second in English



enter image description here



with the following code:



documentclass {article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}
end {document}


What can you depend on? Is there an error or a lack in my code?



Thank you



PS



otfinfo -f recognizes only system-wide features, and not localized ones (neither calt nor locl), that are also present in the font if I check it with FontLab or FontForge:



samiel@darkstar:~/work$ otfinfo --features font.otf



aalt    Access All Alternates
c2sc Small Capitals From Capitals
cpsp Capital Spacing
dnom Denominators
frac Fractions
kern Kerning
liga Standard Ligatures
lnum Lining Figures
numr Numerators
onum Oldstyle Figures
pnum Proportional Figures
smcp Small Capitals
sups Superscript
tnum Tabular Figures
zero Slashed Zero


PS2



I tried various possibilities. The following one:



documentclass{article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
%setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}

end{document}


produces the calt all over the document, not only for Italian and French languages (as in the font localized calt rule).



If I set



setmainfont[Ligatures=TeX,Numbers=OldStyle,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}


the replacement is never produced



Added answer to wrong question:



I tried various possibilities. The following one:



documentclass{article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
%setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}

end{document}


produces the calt all over the document, not only for Italian and Frenc (as inthe font cal rule.



If I set



setmainfont[Ligatures=TeX,Numbers=OldStyle,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}


the replacement is never produced










share|improve this question




















  • 1




    did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?
    – Ulrike Fischer
    5 hours ago










  • Yes, but nothing chages. It takes general font settings and not calt
    – user41063
    5 hours ago










  • Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.
    – Ulrike Fischer
    4 hours ago










  • I happens with all other otf I tried
    – user41063
    4 hours ago






  • 1




    If you know a free font which can be used for tests, add the info to the question.
    – Ulrike Fischer
    4 hours ago














5












5








5







In the .otf fonts where they are present, the Contextual Alternate (calt) and Localized Forms (locl) functions work fine in LibreOffice.



Experiment: I create a quoteright.fr glyph with a large bearing and impose a calt because quoteright glyph in Italian and in French is replaced by quoteright.fr glyph.



With LibreOffice the difference is evident: for the first line I set the Italian language, for the second line the English language (without bearing):



enter image description here



Instead with Xetex I can not enable these functions.



If I do not specify anything in the font features, the contextual substitution rule does not work.



If I enter Contextuals = Alternate I receive the message:



Package fontspec Warning: OpenType feature 'Contextuals = Alternate' (calt) not
(fontspec) available for font 'GaramondPremPro' with script
(fontspec) 'Latin' and language 'Default'.


and again the contextual replacement rule does not work.



Here is Xetex (first line in Italian, second in English



enter image description here



with the following code:



documentclass {article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}
end {document}


What can you depend on? Is there an error or a lack in my code?



Thank you



PS



otfinfo -f recognizes only system-wide features, and not localized ones (neither calt nor locl), that are also present in the font if I check it with FontLab or FontForge:



samiel@darkstar:~/work$ otfinfo --features font.otf



aalt    Access All Alternates
c2sc Small Capitals From Capitals
cpsp Capital Spacing
dnom Denominators
frac Fractions
kern Kerning
liga Standard Ligatures
lnum Lining Figures
numr Numerators
onum Oldstyle Figures
pnum Proportional Figures
smcp Small Capitals
sups Superscript
tnum Tabular Figures
zero Slashed Zero


PS2



I tried various possibilities. The following one:



documentclass{article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
%setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}

end{document}


produces the calt all over the document, not only for Italian and French languages (as in the font localized calt rule).



If I set



setmainfont[Ligatures=TeX,Numbers=OldStyle,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}


the replacement is never produced



Added answer to wrong question:



I tried various possibilities. The following one:



documentclass{article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
%setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}

end{document}


produces the calt all over the document, not only for Italian and Frenc (as inthe font cal rule.



If I set



setmainfont[Ligatures=TeX,Numbers=OldStyle,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}


the replacement is never produced










share|improve this question















In the .otf fonts where they are present, the Contextual Alternate (calt) and Localized Forms (locl) functions work fine in LibreOffice.



Experiment: I create a quoteright.fr glyph with a large bearing and impose a calt because quoteright glyph in Italian and in French is replaced by quoteright.fr glyph.



With LibreOffice the difference is evident: for the first line I set the Italian language, for the second line the English language (without bearing):



enter image description here



Instead with Xetex I can not enable these functions.



If I do not specify anything in the font features, the contextual substitution rule does not work.



If I enter Contextuals = Alternate I receive the message:



Package fontspec Warning: OpenType feature 'Contextuals = Alternate' (calt) not
(fontspec) available for font 'GaramondPremPro' with script
(fontspec) 'Latin' and language 'Default'.


and again the contextual replacement rule does not work.



Here is Xetex (first line in Italian, second in English



enter image description here



with the following code:



documentclass {article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}
end {document}


What can you depend on? Is there an error or a lack in my code?



Thank you



PS



otfinfo -f recognizes only system-wide features, and not localized ones (neither calt nor locl), that are also present in the font if I check it with FontLab or FontForge:



samiel@darkstar:~/work$ otfinfo --features font.otf



aalt    Access All Alternates
c2sc Small Capitals From Capitals
cpsp Capital Spacing
dnom Denominators
frac Fractions
kern Kerning
liga Standard Ligatures
lnum Lining Figures
numr Numerators
onum Oldstyle Figures
pnum Proportional Figures
smcp Small Capitals
sups Superscript
tnum Tabular Figures
zero Slashed Zero


PS2



I tried various possibilities. The following one:



documentclass{article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
%setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}

end{document}


produces the calt all over the document, not only for Italian and French languages (as in the font localized calt rule).



If I set



setmainfont[Ligatures=TeX,Numbers=OldStyle,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}


the replacement is never produced



Added answer to wrong question:



I tried various possibilities. The following one:



documentclass{article}
usepackage{fontspec}
setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
%setmainlanguage[babelshorthands=true]{italian}
setotherlanguages{english}

begin{document}

I'I N'P

begin{english}I'I N'Pend{english}

end{document}


produces the calt all over the document, not only for Italian and Frenc (as inthe font cal rule.



If I set



setmainfont[Ligatures=TeX,Numbers=OldStyle,RawFeature={+calt}]{Garamond Premier Pro}
usepackage{polyglossia}
setmainlanguage[babelshorthands=true]{italian}


the replacement is never produced







xetex fontspec






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 hours ago









Kurt

35.4k847159




35.4k847159










asked 5 hours ago









user41063

6931510




6931510








  • 1




    did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?
    – Ulrike Fischer
    5 hours ago










  • Yes, but nothing chages. It takes general font settings and not calt
    – user41063
    5 hours ago










  • Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.
    – Ulrike Fischer
    4 hours ago










  • I happens with all other otf I tried
    – user41063
    4 hours ago






  • 1




    If you know a free font which can be used for tests, add the info to the question.
    – Ulrike Fischer
    4 hours ago














  • 1




    did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?
    – Ulrike Fischer
    5 hours ago










  • Yes, but nothing chages. It takes general font settings and not calt
    – user41063
    5 hours ago










  • Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.
    – Ulrike Fischer
    4 hours ago










  • I happens with all other otf I tried
    – user41063
    4 hours ago






  • 1




    If you know a free font which can be used for tests, add the info to the question.
    – Ulrike Fischer
    4 hours ago








1




1




did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?
– Ulrike Fischer
5 hours ago




did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?
– Ulrike Fischer
5 hours ago












Yes, but nothing chages. It takes general font settings and not calt
– user41063
5 hours ago




Yes, but nothing chages. It takes general font settings and not calt
– user41063
5 hours ago












Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.
– Ulrike Fischer
4 hours ago




Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.
– Ulrike Fischer
4 hours ago












I happens with all other otf I tried
– user41063
4 hours ago




I happens with all other otf I tried
– user41063
4 hours ago




1




1




If you know a free font which can be used for tests, add the info to the question.
– Ulrike Fischer
4 hours ago




If you know a free font which can be used for tests, add the info to the question.
– Ulrike Fischer
4 hours ago










1 Answer
1






active

oldest

votes


















4














The font in your comment works fine for me:



documentclass{article}
usepackage{fontspec}
setmainfont[Language=Italian]{SamielPro.otf}
setsansfont{SamielPro.otf}

begin{document}

I'I N'P

sffamily
I'I N'P


end{document}


enter image description here



With lualatex it doesn't work, there one need to add the calc-feature explicitly:



setmainfont[Language=Italian,RawFeature=+calt]{SamielPro.otf}


A language depending call could be setup with babel and babelfont:



documentclass{article}
usepackage{fontspec}
usepackage[english,italian]{babel}
babelfont{rm}[Ligatures=TeX]{SamielPro.otf}

% for luatex:
%babelfont[italian]{rm}[RawFeature=+calt,Ligatures=TeX]{SamielPro.otf}

begin{document}

I'I N'P

selectlanguage{english}
I'I N'P

end{document}





share|improve this answer























  • sorry, I don't understand your usage of sfamily
    – user41063
    3 hours ago










  • I simply wanted the two variant under different commands.
    – Ulrike Fischer
    3 hours ago










  • but if I've an Italian or French text and an English one? Why specifying the languages as in my exemples above it doesn't work? It's not a sans but a serif font.... I'm rather confused
    – user41063
    3 hours ago












  • In LibreOffice all works fine, according to the chosen language, according to the sense of contextual substitution (calt) based on language, French or Italian on one side, all other languages on other side...
    – user41063
    3 hours ago










  • I added an example for language dependant switches - but it assumes that the low level call in my first example actually works.
    – Ulrike Fischer
    3 hours ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f467943%2fxetex-support-for-otf-features%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














The font in your comment works fine for me:



documentclass{article}
usepackage{fontspec}
setmainfont[Language=Italian]{SamielPro.otf}
setsansfont{SamielPro.otf}

begin{document}

I'I N'P

sffamily
I'I N'P


end{document}


enter image description here



With lualatex it doesn't work, there one need to add the calc-feature explicitly:



setmainfont[Language=Italian,RawFeature=+calt]{SamielPro.otf}


A language depending call could be setup with babel and babelfont:



documentclass{article}
usepackage{fontspec}
usepackage[english,italian]{babel}
babelfont{rm}[Ligatures=TeX]{SamielPro.otf}

% for luatex:
%babelfont[italian]{rm}[RawFeature=+calt,Ligatures=TeX]{SamielPro.otf}

begin{document}

I'I N'P

selectlanguage{english}
I'I N'P

end{document}





share|improve this answer























  • sorry, I don't understand your usage of sfamily
    – user41063
    3 hours ago










  • I simply wanted the two variant under different commands.
    – Ulrike Fischer
    3 hours ago










  • but if I've an Italian or French text and an English one? Why specifying the languages as in my exemples above it doesn't work? It's not a sans but a serif font.... I'm rather confused
    – user41063
    3 hours ago












  • In LibreOffice all works fine, according to the chosen language, according to the sense of contextual substitution (calt) based on language, French or Italian on one side, all other languages on other side...
    – user41063
    3 hours ago










  • I added an example for language dependant switches - but it assumes that the low level call in my first example actually works.
    – Ulrike Fischer
    3 hours ago
















4














The font in your comment works fine for me:



documentclass{article}
usepackage{fontspec}
setmainfont[Language=Italian]{SamielPro.otf}
setsansfont{SamielPro.otf}

begin{document}

I'I N'P

sffamily
I'I N'P


end{document}


enter image description here



With lualatex it doesn't work, there one need to add the calc-feature explicitly:



setmainfont[Language=Italian,RawFeature=+calt]{SamielPro.otf}


A language depending call could be setup with babel and babelfont:



documentclass{article}
usepackage{fontspec}
usepackage[english,italian]{babel}
babelfont{rm}[Ligatures=TeX]{SamielPro.otf}

% for luatex:
%babelfont[italian]{rm}[RawFeature=+calt,Ligatures=TeX]{SamielPro.otf}

begin{document}

I'I N'P

selectlanguage{english}
I'I N'P

end{document}





share|improve this answer























  • sorry, I don't understand your usage of sfamily
    – user41063
    3 hours ago










  • I simply wanted the two variant under different commands.
    – Ulrike Fischer
    3 hours ago










  • but if I've an Italian or French text and an English one? Why specifying the languages as in my exemples above it doesn't work? It's not a sans but a serif font.... I'm rather confused
    – user41063
    3 hours ago












  • In LibreOffice all works fine, according to the chosen language, according to the sense of contextual substitution (calt) based on language, French or Italian on one side, all other languages on other side...
    – user41063
    3 hours ago










  • I added an example for language dependant switches - but it assumes that the low level call in my first example actually works.
    – Ulrike Fischer
    3 hours ago














4












4








4






The font in your comment works fine for me:



documentclass{article}
usepackage{fontspec}
setmainfont[Language=Italian]{SamielPro.otf}
setsansfont{SamielPro.otf}

begin{document}

I'I N'P

sffamily
I'I N'P


end{document}


enter image description here



With lualatex it doesn't work, there one need to add the calc-feature explicitly:



setmainfont[Language=Italian,RawFeature=+calt]{SamielPro.otf}


A language depending call could be setup with babel and babelfont:



documentclass{article}
usepackage{fontspec}
usepackage[english,italian]{babel}
babelfont{rm}[Ligatures=TeX]{SamielPro.otf}

% for luatex:
%babelfont[italian]{rm}[RawFeature=+calt,Ligatures=TeX]{SamielPro.otf}

begin{document}

I'I N'P

selectlanguage{english}
I'I N'P

end{document}





share|improve this answer














The font in your comment works fine for me:



documentclass{article}
usepackage{fontspec}
setmainfont[Language=Italian]{SamielPro.otf}
setsansfont{SamielPro.otf}

begin{document}

I'I N'P

sffamily
I'I N'P


end{document}


enter image description here



With lualatex it doesn't work, there one need to add the calc-feature explicitly:



setmainfont[Language=Italian,RawFeature=+calt]{SamielPro.otf}


A language depending call could be setup with babel and babelfont:



documentclass{article}
usepackage{fontspec}
usepackage[english,italian]{babel}
babelfont{rm}[Ligatures=TeX]{SamielPro.otf}

% for luatex:
%babelfont[italian]{rm}[RawFeature=+calt,Ligatures=TeX]{SamielPro.otf}

begin{document}

I'I N'P

selectlanguage{english}
I'I N'P

end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited 3 hours ago

























answered 3 hours ago









Ulrike Fischer

186k7290669




186k7290669












  • sorry, I don't understand your usage of sfamily
    – user41063
    3 hours ago










  • I simply wanted the two variant under different commands.
    – Ulrike Fischer
    3 hours ago










  • but if I've an Italian or French text and an English one? Why specifying the languages as in my exemples above it doesn't work? It's not a sans but a serif font.... I'm rather confused
    – user41063
    3 hours ago












  • In LibreOffice all works fine, according to the chosen language, according to the sense of contextual substitution (calt) based on language, French or Italian on one side, all other languages on other side...
    – user41063
    3 hours ago










  • I added an example for language dependant switches - but it assumes that the low level call in my first example actually works.
    – Ulrike Fischer
    3 hours ago


















  • sorry, I don't understand your usage of sfamily
    – user41063
    3 hours ago










  • I simply wanted the two variant under different commands.
    – Ulrike Fischer
    3 hours ago










  • but if I've an Italian or French text and an English one? Why specifying the languages as in my exemples above it doesn't work? It's not a sans but a serif font.... I'm rather confused
    – user41063
    3 hours ago












  • In LibreOffice all works fine, according to the chosen language, according to the sense of contextual substitution (calt) based on language, French or Italian on one side, all other languages on other side...
    – user41063
    3 hours ago










  • I added an example for language dependant switches - but it assumes that the low level call in my first example actually works.
    – Ulrike Fischer
    3 hours ago
















sorry, I don't understand your usage of sfamily
– user41063
3 hours ago




sorry, I don't understand your usage of sfamily
– user41063
3 hours ago












I simply wanted the two variant under different commands.
– Ulrike Fischer
3 hours ago




I simply wanted the two variant under different commands.
– Ulrike Fischer
3 hours ago












but if I've an Italian or French text and an English one? Why specifying the languages as in my exemples above it doesn't work? It's not a sans but a serif font.... I'm rather confused
– user41063
3 hours ago






but if I've an Italian or French text and an English one? Why specifying the languages as in my exemples above it doesn't work? It's not a sans but a serif font.... I'm rather confused
– user41063
3 hours ago














In LibreOffice all works fine, according to the chosen language, according to the sense of contextual substitution (calt) based on language, French or Italian on one side, all other languages on other side...
– user41063
3 hours ago




In LibreOffice all works fine, according to the chosen language, according to the sense of contextual substitution (calt) based on language, French or Italian on one side, all other languages on other side...
– user41063
3 hours ago












I added an example for language dependant switches - but it assumes that the low level call in my first example actually works.
– Ulrike Fischer
3 hours ago




I added an example for language dependant switches - but it assumes that the low level call in my first example actually works.
– Ulrike Fischer
3 hours ago


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f467943%2fxetex-support-for-otf-features%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Morgemoulin

Scott Moir

Souastre