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
    Dec 30 '18 at 19:50











  • Yes, but nothing chages. It takes general font settings and not calt

    – user41063
    Dec 30 '18 at 20:04











  • Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.

    – Ulrike Fischer
    Dec 30 '18 at 20:13











  • I happens with all other otf I tried

    – user41063
    Dec 30 '18 at 20:21






  • 2





    If you know a free font which can be used for tests, add the info to the question.

    – Ulrike Fischer
    Dec 30 '18 at 20:36
















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
    Dec 30 '18 at 19:50











  • Yes, but nothing chages. It takes general font settings and not calt

    – user41063
    Dec 30 '18 at 20:04











  • Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.

    – Ulrike Fischer
    Dec 30 '18 at 20:13











  • I happens with all other otf I tried

    – user41063
    Dec 30 '18 at 20:21






  • 2





    If you know a free font which can be used for tests, add the info to the question.

    – Ulrike Fischer
    Dec 30 '18 at 20:36














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 Dec 30 '18 at 22:25









Kurt

38.3k848162




38.3k848162










asked Dec 30 '18 at 19:45









user41063user41063

7931511




7931511








  • 1





    did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?

    – Ulrike Fischer
    Dec 30 '18 at 19:50











  • Yes, but nothing chages. It takes general font settings and not calt

    – user41063
    Dec 30 '18 at 20:04











  • Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.

    – Ulrike Fischer
    Dec 30 '18 at 20:13











  • I happens with all other otf I tried

    – user41063
    Dec 30 '18 at 20:21






  • 2





    If you know a free font which can be used for tests, add the info to the question.

    – Ulrike Fischer
    Dec 30 '18 at 20:36














  • 1





    did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?

    – Ulrike Fischer
    Dec 30 '18 at 19:50











  • Yes, but nothing chages. It takes general font settings and not calt

    – user41063
    Dec 30 '18 at 20:04











  • Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.

    – Ulrike Fischer
    Dec 30 '18 at 20:13











  • I happens with all other otf I tried

    – user41063
    Dec 30 '18 at 20:21






  • 2





    If you know a free font which can be used for tests, add the info to the question.

    – Ulrike Fischer
    Dec 30 '18 at 20:36








1




1





did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?

– Ulrike Fischer
Dec 30 '18 at 19:50





did you try to change the language? setmainfont[Ligatures=TeX,Numbers=OldStyle,Language=Italian]{GaramondPremPro}?

– Ulrike Fischer
Dec 30 '18 at 19:50













Yes, but nothing chages. It takes general font settings and not calt

– user41063
Dec 30 '18 at 20:04





Yes, but nothing chages. It takes general font settings and not calt

– user41063
Dec 30 '18 at 20:04













Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.

– Ulrike Fischer
Dec 30 '18 at 20:13





Well without the font it is difficult to test. If your feature needs locl you could activate it with the RawFeature key.

– Ulrike Fischer
Dec 30 '18 at 20:13













I happens with all other otf I tried

– user41063
Dec 30 '18 at 20:21





I happens with all other otf I tried

– user41063
Dec 30 '18 at 20:21




2




2





If you know a free font which can be used for tests, add the info to the question.

– Ulrike Fischer
Dec 30 '18 at 20:36





If you know a free font which can be used for tests, add the info to the question.

– Ulrike Fischer
Dec 30 '18 at 20:36










1 Answer
1






active

oldest

votes


















5














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
    Dec 30 '18 at 21:19











  • I simply wanted the two variant under different commands.

    – Ulrike Fischer
    Dec 30 '18 at 21:20











  • 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
    Dec 30 '18 at 21:21








  • 1





    Well the warning seems to be wrong, the numbers are oldstyle. Make a bug report at the fontspec site.

    – Ulrike Fischer
    Dec 30 '18 at 23:30






  • 1





    but I've no more smallcaps, no more oldstyle proportional numbers (only monospaced), no more lining numbers... Ok, I'll write to the fontspec site

    – user41063
    Dec 30 '18 at 23:38











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









5














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
    Dec 30 '18 at 21:19











  • I simply wanted the two variant under different commands.

    – Ulrike Fischer
    Dec 30 '18 at 21:20











  • 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
    Dec 30 '18 at 21:21








  • 1





    Well the warning seems to be wrong, the numbers are oldstyle. Make a bug report at the fontspec site.

    – Ulrike Fischer
    Dec 30 '18 at 23:30






  • 1





    but I've no more smallcaps, no more oldstyle proportional numbers (only monospaced), no more lining numbers... Ok, I'll write to the fontspec site

    – user41063
    Dec 30 '18 at 23:38
















5














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
    Dec 30 '18 at 21:19











  • I simply wanted the two variant under different commands.

    – Ulrike Fischer
    Dec 30 '18 at 21:20











  • 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
    Dec 30 '18 at 21:21








  • 1





    Well the warning seems to be wrong, the numbers are oldstyle. Make a bug report at the fontspec site.

    – Ulrike Fischer
    Dec 30 '18 at 23:30






  • 1





    but I've no more smallcaps, no more oldstyle proportional numbers (only monospaced), no more lining numbers... Ok, I'll write to the fontspec site

    – user41063
    Dec 30 '18 at 23:38














5












5








5







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 Dec 30 '18 at 21:48

























answered Dec 30 '18 at 21:07









Ulrike FischerUlrike Fischer

193k8302686




193k8302686













  • sorry, I don't understand your usage of sfamily

    – user41063
    Dec 30 '18 at 21:19











  • I simply wanted the two variant under different commands.

    – Ulrike Fischer
    Dec 30 '18 at 21:20











  • 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
    Dec 30 '18 at 21:21








  • 1





    Well the warning seems to be wrong, the numbers are oldstyle. Make a bug report at the fontspec site.

    – Ulrike Fischer
    Dec 30 '18 at 23:30






  • 1





    but I've no more smallcaps, no more oldstyle proportional numbers (only monospaced), no more lining numbers... Ok, I'll write to the fontspec site

    – user41063
    Dec 30 '18 at 23:38



















  • sorry, I don't understand your usage of sfamily

    – user41063
    Dec 30 '18 at 21:19











  • I simply wanted the two variant under different commands.

    – Ulrike Fischer
    Dec 30 '18 at 21:20











  • 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
    Dec 30 '18 at 21:21








  • 1





    Well the warning seems to be wrong, the numbers are oldstyle. Make a bug report at the fontspec site.

    – Ulrike Fischer
    Dec 30 '18 at 23:30






  • 1





    but I've no more smallcaps, no more oldstyle proportional numbers (only monospaced), no more lining numbers... Ok, I'll write to the fontspec site

    – user41063
    Dec 30 '18 at 23:38

















sorry, I don't understand your usage of sfamily

– user41063
Dec 30 '18 at 21:19





sorry, I don't understand your usage of sfamily

– user41063
Dec 30 '18 at 21:19













I simply wanted the two variant under different commands.

– Ulrike Fischer
Dec 30 '18 at 21:20





I simply wanted the two variant under different commands.

– Ulrike Fischer
Dec 30 '18 at 21:20













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
Dec 30 '18 at 21:21







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
Dec 30 '18 at 21:21






1




1





Well the warning seems to be wrong, the numbers are oldstyle. Make a bug report at the fontspec site.

– Ulrike Fischer
Dec 30 '18 at 23:30





Well the warning seems to be wrong, the numbers are oldstyle. Make a bug report at the fontspec site.

– Ulrike Fischer
Dec 30 '18 at 23:30




1




1





but I've no more smallcaps, no more oldstyle proportional numbers (only monospaced), no more lining numbers... Ok, I'll write to the fontspec site

– user41063
Dec 30 '18 at 23:38





but I've no more smallcaps, no more oldstyle proportional numbers (only monospaced), no more lining numbers... Ok, I'll write to the fontspec site

– user41063
Dec 30 '18 at 23:38


















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.




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

Bressuire

Cabo Verde

Gyllenstierna