Quantcast
Channel: TypeDrawers
Viewing all articles
Browse latest Browse all 4153

Chaining substitution (?)

$
0
0
Plz, consider the image:

And here is the problem: where I have a text in small caps, but with capital letters (second line of the image; in LaTeX, for example, <\textsc{D'Onofrio}>, but the same thing happens with the option <:smcp> in OpenOffice) , the <quoteright.sc> is also used between capital letters, while in this specific case I would like it to be "normal" or "capital" (as in the third line of the image).
I thought about creating this code:

lookup caltContextualAlternateslookup31 {

  lookupflag 0;  
  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  ;
} caltContextualAlternateslookup31;
feature calt {   script latn;      language AZE  exclude_dflt;       lookup caltContextualAlternateslookup31;      language CRT  exclude_dflt;       lookup caltContextualAlternateslookup31;      language DEU  exclude_dflt;       lookup caltContextualAlternateslookup31;      language FRA  exclude_dflt;       lookup caltContextualAlternateslookup31;      language ITA  exclude_dflt;       lookup caltContextualAlternateslookup31;      language MOL  exclude_dflt;       lookup caltContextualAlternateslookup31;      language ROM  exclude_dflt;       lookup caltContextualAlternateslookup31;      language TRK  exclude_dflt;       lookup caltContextualAlternateslookup31;      language dflt ;       lookup caltContextualAlternateslookup31;
} calt;

and

lookup SingleSubstitutionlookup34 {

  lookupflag 0;

    sub \quoteright.sc by \quoteright.fr ;

} SingleSubstitutionlookup31;

The trouble is that it doesn't work :( I don't know if it depends on the fact that the system also means capital letters as small caps and therefore does not apply the rule, or if my approach is completely wrong...

Viewing all articles
Browse latest Browse all 4153

Trending Articles