2017-02-15 20:11:44 -06:00
|
|
|
// 14 february 2017
|
|
|
|
#import "uipriv_darwin.h"
|
|
|
|
|
2017-05-19 14:14:41 -05:00
|
|
|
struct openTypeAATParams {
|
|
|
|
void (*doAAT)(uint16_t type, uint16_t selector, void *data);
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define pcall(p, type, selector) ((*(p->doAAT))(type, selector, p->data))
|
|
|
|
|
|
|
|
static void boolspec(uint32_t value, uint16_t type, uint16_t ifTrue, uint16_t ifFalse, struct openTypeAATParams *p)
|
2017-02-15 20:11:44 -06:00
|
|
|
{
|
2017-05-19 14:14:41 -05:00
|
|
|
// TODO are values other than 1 accepted for true by OpenType itself? (same for the rest of the file)
|
|
|
|
if (value != 0) {
|
|
|
|
pcall(p, type, ifTrue);
|
2017-02-15 20:11:44 -06:00
|
|
|
return;
|
|
|
|
}
|
2017-05-19 14:14:41 -05:00
|
|
|
pcall(p, type, ifFalse);
|
2017-02-15 20:11:44 -06:00
|
|
|
}
|
|
|
|
|
2017-05-19 14:14:41 -05:00
|
|
|
void openTypeToAAT(char a, char b, char c, char d, uint32_t value, void *data)
|
2017-02-15 20:11:44 -06:00
|
|
|
{
|
2017-05-19 14:14:41 -05:00
|
|
|
struct openTypeAATParams *p = (struct openTypeAATParams *) data;
|
|
|
|
|
|
|
|
switch (mkTag(a, b, c, d)) {
|
|
|
|
case mkTag('l', 'i', 'g', 'a'):
|
|
|
|
boolspec(value, kLigaturesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kCommonLigaturesOnSelector,
|
|
|
|
kCommonLigaturesOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('r', 'l', 'i', 'g'):
|
|
|
|
boolspec(value, kLigaturesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kRequiredLigaturesOnSelector,
|
|
|
|
kRequiredLigaturesOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('d', 'l', 'i', 'g'):
|
|
|
|
boolspec(value, kLigaturesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kRareLigaturesOnSelector,
|
|
|
|
kRareLigaturesOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('c', 'l', 'i', 'g'):
|
|
|
|
boolspec(value, kLigaturesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kContextualLigaturesOnSelector,
|
|
|
|
kContextualLigaturesOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('h', 'l', 'i', 'g'):
|
|
|
|
// This technically isn't what is meant by "historical ligatures", but Core Text's internal AAT-to-OpenType mapping says to include it, so we include it too
|
|
|
|
case mkTag('h', 'i', 's', 't'):
|
|
|
|
boolspec(value, kLigaturesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kHistoricalLigaturesOnSelector,
|
|
|
|
kHistoricalLigaturesOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('u', 'n', 'i', 'c'):
|
2017-02-15 20:11:44 -06:00
|
|
|
// TODO is this correct, or should we provide an else case?
|
2017-05-19 14:14:41 -05:00
|
|
|
if (value != 0)
|
2017-02-15 20:11:44 -06:00
|
|
|
// this is undocumented; it comes from Core Text's internal AAT-to-OpenType conversion table
|
2017-05-19 14:14:41 -05:00
|
|
|
pcall(p, kLetterCaseType, 14);
|
|
|
|
break;
|
|
|
|
|
|
|
|
// TODO will the following handle all cases properly, or are elses going to be needed?
|
|
|
|
case mkTag('p', 'n', 'u', 'm'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kNumberSpacingType, kProportionalNumbersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('t', 'n', 'u', 'm'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kNumberSpacingType, kMonospacedNumbersSelector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
// TODO will the following handle all cases properly, or are elses going to be needed?
|
|
|
|
case mkTag('s', 'u', 'p', 's'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kVerticalPositionType, kSuperiorsSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 'u', 'b', 's'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kVerticalPositionType, kInferiorsSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('o', 'r', 'd', 'n'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kVerticalPositionType, kOrdinalsSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 'i', 'n', 'f'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kVerticalPositionType, kScientificInferiorsSelector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
// TODO will the following handle all cases properly, or are elses going to be needed?
|
|
|
|
case mkTag('a', 'f', 'r', 'c'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kFractionsType, kVerticalFractionsSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('f', 'r', 'a', 'c'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kFractionsType, kDiagonalFractionsSelector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case mkTag('z', 'e', 'r', 'o'):
|
|
|
|
boolspec(value, kTypographicExtrasType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kSlashedZeroOnSelector,
|
|
|
|
kSlashedZeroOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('m', 'g', 'r', 'k'):
|
|
|
|
boolspec(value, kMathematicalExtrasType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kMathematicalGreekOnSelector,
|
|
|
|
kMathematicalGreekOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('o', 'r', 'n', 'm'):
|
|
|
|
pcall(p, kOrnamentSetsType, (uint16_t) value);
|
|
|
|
break;
|
|
|
|
case mkTag('a', 'a', 'l', 't'):
|
|
|
|
pcall(p, kCharacterAlternativesType, (uint16_t) value);
|
|
|
|
break;
|
|
|
|
case mkTag('t', 'i', 't', 'l'):
|
2017-02-15 20:11:44 -06:00
|
|
|
// TODO is this correct, or should we provide an else case?
|
|
|
|
if (spec->Value != 0)
|
2017-05-19 14:14:41 -05:00
|
|
|
pcall(p, kStyleOptionsType, kTitlingCapsSelector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
// TODO will the following handle all cases properly, or are elses going to be needed?
|
|
|
|
case mkTag('t', 'r', 'a', 'd'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kTraditionalCharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 'm', 'p', 'l'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kSimplifiedCharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('j', 'p', '7', '8'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kJIS1978CharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('j', 'p', '8', '3'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kJIS1983CharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('j', 'p', '9', '0'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kJIS1990CharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('e', 'x', 'p', 't'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kExpertCharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('j', 'p', '0', '4'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kJIS2004CharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('h', 'o', 'j', 'o'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kHojoCharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('n', 'l', 'c', 'k'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kNLCCharactersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('t', 'n', 'a', 'm'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kCharacterShapeType, kTraditionalNamesCharactersSelector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case mkTag('o', 'n', 'u', 'm'):
|
|
|
|
// Core Text's internal AAT-to-OpenType mapping says to include this, so we include it too
|
|
|
|
// TODO is it always set?
|
|
|
|
case mkTag('l', 'n', 'u', 'm'):
|
2017-02-15 20:11:44 -06:00
|
|
|
// TODO is this correct, or should we provide an else case?
|
2017-05-19 14:14:41 -05:00
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kNumberCaseType, kLowerCaseNumbersSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('h', 'n', 'g', 'l'):
|
2017-02-15 20:11:44 -06:00
|
|
|
// TODO is this correct, or should we provide an else case?
|
2017-05-19 14:14:41 -05:00
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kTransliterationType, kHanjaToHangulSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('n', 'a', 'l', 't'):
|
|
|
|
pcall(p, kAnnotationType, (uint16_t) value);
|
|
|
|
break;
|
|
|
|
case mkTag('r', 'u', 'b', 'y'):
|
2017-02-15 20:11:44 -06:00
|
|
|
// include this for completeness
|
2017-05-19 14:14:41 -05:00
|
|
|
boolspec(value, kRubyKanaType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kRubyKanaSelector,
|
|
|
|
kNoRubyKanaSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
2017-02-15 20:11:44 -06:00
|
|
|
// this is the current one
|
2017-05-19 14:14:41 -05:00
|
|
|
boolspec(value, kRubyKanaType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kRubyKanaOnSelector,
|
|
|
|
kRubyKanaOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('i', 't', 'a', 'l'):
|
2017-02-15 20:11:44 -06:00
|
|
|
// include this for completeness
|
2017-05-19 14:14:41 -05:00
|
|
|
boolspec(value, kItalicCJKRomanType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kCJKItalicRomanSelector,
|
|
|
|
kNoCJKItalicRomanSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
2017-02-15 20:11:44 -06:00
|
|
|
// this is the current one
|
2017-05-19 14:14:41 -05:00
|
|
|
boolspec(value, kItalicCJKRomanType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kCJKItalicRomanOnSelector,
|
|
|
|
kCJKItalicRomanOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('c', 'a', 's', 'e'):
|
|
|
|
boolspec(value, kCaseSensitiveLayoutType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kCaseSensitiveLayoutOnSelector,
|
|
|
|
kCaseSensitiveLayoutOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('c', 'p', 's', 'p'):
|
|
|
|
boolspec(value, kCaseSensitiveLayoutType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kCaseSensitiveSpacingOnSelector,
|
|
|
|
kCaseSensitiveSpacingOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('h', 'k', 'n', 'a'):
|
|
|
|
boolspec(value, kAlternateKanaType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kAlternateHorizKanaOnSelector,
|
|
|
|
kAlternateHorizKanaOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('v', 'k', 'n', 'a'):
|
|
|
|
boolspec(value, kAlternateKanaType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kAlternateVertKanaOnSelector,
|
|
|
|
kAlternateVertKanaOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '1'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltOneOnSelector,
|
|
|
|
kStylisticAltOneOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '2'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltTwoOnSelector,
|
|
|
|
kStylisticAltTwoOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '3'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltThreeOnSelector,
|
|
|
|
kStylisticAltThreeOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '4'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltFourOnSelector,
|
|
|
|
kStylisticAltFourOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '5'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltFiveOnSelector,
|
|
|
|
kStylisticAltFiveOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '6'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltSixOnSelector,
|
|
|
|
kStylisticAltSixOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '7'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltSevenOnSelector,
|
|
|
|
kStylisticAltSevenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '8'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltEightOnSelector,
|
|
|
|
kStylisticAltEightOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '0', '9'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltNineOnSelector,
|
|
|
|
kStylisticAltNineOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '0'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltTenOnSelector,
|
|
|
|
kStylisticAltTenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '1'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltElevenOnSelector,
|
|
|
|
kStylisticAltElevenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '2'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltTwelveOnSelector,
|
|
|
|
kStylisticAltTwelveOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '3'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltThirteenOnSelector,
|
|
|
|
kStylisticAltThirteenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '4'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltFourteenOnSelector,
|
|
|
|
kStylisticAltFourteenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '5'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltFifteenOnSelector,
|
|
|
|
kStylisticAltFifteenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '6'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltSixteenOnSelector,
|
|
|
|
kStylisticAltSixteenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '7'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltSeventeenOnSelector,
|
|
|
|
kStylisticAltSeventeenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '8'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltEighteenOnSelector,
|
|
|
|
kStylisticAltEighteenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '1', '9'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltNineteenOnSelector,
|
|
|
|
kStylisticAltNineteenOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 's', '2', '0'):
|
|
|
|
boolspec(value, kStylisticAlternativesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kStylisticAltTwentyOnSelector,
|
|
|
|
kStylisticAltTwentyOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('c', 'a', 'l', 't'):
|
|
|
|
boolspec(value, kContextualAlternatesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kContextualAlternatesOnSelector,
|
|
|
|
kContextualAlternatesOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('s', 'w', 's', 'h'):
|
|
|
|
boolspec(value, kContextualAlternatesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kSwashAlternatesOnSelector,
|
|
|
|
kSwashAlternatesOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
case mkTag('c', 's', 'w', 'h'):
|
|
|
|
boolspec(value, kContextualAlternatesType,
|
2017-02-15 20:11:44 -06:00
|
|
|
kContextualSwashAlternatesOnSelector,
|
|
|
|
kContextualSwashAlternatesOffSelector,
|
2017-05-19 14:14:41 -05:00
|
|
|
p);
|
|
|
|
break;
|
|
|
|
|
|
|
|
// TODO will the following handle all cases properly, or are elses going to be needed?
|
|
|
|
case mkTag('s', 'm', 'c', 'p'):
|
|
|
|
if (value != 0) {
|
2017-02-15 20:11:44 -06:00
|
|
|
// include this for compatibility (some fonts that come with OS X still use this!)
|
|
|
|
// TODO make it boolean?
|
2017-05-19 14:14:41 -05:00
|
|
|
pcall(p, kLetterCaseType, kSmallCapsSelector);
|
2017-02-15 20:11:44 -06:00
|
|
|
// this is the current one
|
2017-05-19 14:14:41 -05:00
|
|
|
pcall(p, kLowerCaseType, kLowerCaseSmallCapsSelector);
|
2017-02-15 20:11:44 -06:00
|
|
|
}
|
2017-05-19 14:14:41 -05:00
|
|
|
break;
|
|
|
|
case mkTag('p', 'c', 'a', 'p'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kLowerCaseType, kLowerCasePetiteCapsSelector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
// TODO will the following handle all cases properly, or are elses going to be needed?
|
|
|
|
case mkTag('c', '2', 's', 'c'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kUpperCaseType, kUpperCaseSmallCapsSelector);
|
|
|
|
break;
|
|
|
|
case mkTag('c', '2', 'p', 'c'):
|
|
|
|
if (value != 0)
|
|
|
|
pcall(p, kUpperCaseType, kUpperCasePetiteCapsSelector);
|
|
|
|
break;
|
2017-02-15 20:11:44 -06:00
|
|
|
}
|
|
|
|
}
|