<div>lookup caltContextualAlternateslookup31 { </div><div> lookupflag 0;</div><div> sub [\quoteright.sc ] [\A \B \C \D \E \F \G \H \I \J \K \L \M \N \O \P \Q \R \S \T \U \V \W \X \Y \Z ]'lookup SingleSubstitutionlookup34 ;</div><div> } caltContextualAlternateslookup31;</div><div><br></div><div>feature calt { </div><div> script latn; </div><div> language AZE exclude_dflt; </div><div> lookup caltContextualAlternateslookup31; </div><div> language CRT exclude_dflt; </div><div> lookup caltContextualAlternateslookup31; </div><div> language DEU exclude_dflt; </div><div> lookup caltContextualAlternateslookup31; </div><div> language FRA exclude_dflt; </div><div> lookup caltContextualAlternateslookup31; </div><div> language ITA exclude_dflt; </div><div> lookup caltContextualAlternateslookup31; </div><div> language MOL exclude_dflt; </div><div> lookup caltContextualAlternateslookup31; </div><div> language ROM exclude_dflt; </div><div> lookup caltContextualAlternateslookup31; </div><div> language TRK exclude_dflt; </div><div> lookup caltContextualAlternateslookup31; </div><div> language dflt ; </div><div> lookup caltContextualAlternateslookup31;</div><div><br></div><div>} calt;</div>
<div>lookup SingleSubstitutionlookup34 { </div><div> lookupflag 0; </div><div> sub \quoteright.sc by \quoteright.fr ; </div><div>} SingleSubstitutionlookup31;</div>
Comments
since caltContextualAlternateslookup31 is part of the default, all of these can simply be left out. If you have registered these languages as part of your languagesystem statements, all of these will automatically be included as "language TRK include_dflt;" which would save you a lot of typing.
\textsc{small caps text}.
With LibreOffice I select the font in the font windows and add at end the string <:smcp>; then, I come back to the text window and write.
I cancelled the 'calt' lookup, cancelled the quoteright --> quoteright.sc substitution in 'smcp' and put it into 'c2sc'.
Now, if I write <D'Onofrio> in small caps but with uppercase initial \textsc{D'Onofrio}, all seems to work fine.
On the contrary, if I write all in small caps \textsc{d'onofrio}, I've still the quoteright, and not quoteright.sc:
Compare it with the first line of the image of my first post
If you change the text encoding to all lowercase — d'onofrio —, then what you are displaying is exactly what I would expect.
A chainig substitution (a right one, not wrong as mine) is not the solution?
Then you might try to add a new subtable after it:
so it gets executed after the to-small caps code. I think that ought to work.
Do you mean a subtable of 'smpc' for simple substitution? With 2 glyphs inside? Is it possible??
@André G. Isaak
I create small caps only from lowercase letters. I think it's normal practice. In fact I write <\textsc{d'onofrio}> to have all (letters and apostrophe) as .sc.
I can create a LaTeX command to have all upper- and lowercase in small caps
\newrobustcmd\asc[1]{{\addfontfeature{Letters=UppercaseSmallCaps,Letters=SmallCaps}#1}}
but this way even D and O of D'Onofrio becomel cap.
Now I'm pretty confused
For my aim is to keep D and O uppercase in any case
Smallcaps are typographic variants that may represent either upper- or lowercase characters depending on their typographic role. So the two OpenType Layout features <c2sc> and <smcp> are intended to provide for substitutions of, respectively, uppercase and lowercase to smallcaps. This means that one doesn't need to edit and change the encoding of the text in order to display it in smallcaps. One shouldn't need to change NASA to nasa just to get it to appear as smallcaps.
When smallcaps do represent only lowercase letters, the norm is for punctuation to remain in default style like the caps.
The way I normally implement small caps, which I think is rather standard except that I don't bother with having separate a.sc and A.sc characters, is as follows: I create three classes, SmallCaps, LCToSmallCaps and UCToSmallCaps.
The smcp feature includes
sub @LCToSmallCaps by @SmallCaps;
along with a few oddballs with no uppercase equivalents such as dotlessi->dotlessi.sc.
The c2sc feature includes
sub @UCToSmallCaps by @SmallCaps;
followed by substitutions which convert numerals to small figures and which replace punctuations, brackets, ampersands etc. with small cap forms where appropriate.
This approach, however, only works if the user is entering text in its normal upper- and lower-case form and then selecting 'smcp' when they want mixed uppercase/small caps or selecting 'all small caps' (which calls both 'smcp' and 'c2sc') when they want all small caps.
You should make use of the LaTeX command you mention to get small caps from both upper and lowercase letters rather than entering everything in lowercase; For OpenOffice I think you're stuck having to enter both features manually.
Basically, the problem seems to be an application interface problem rather than a font problem.