Krita Source Code Documentation
Loading...
Searching...
No Matches
KoOpenTypeFeatureInfoFactory Class Reference

The KoOpenTypeFeatureInfoFactory class. More...

#include <KoOpenTypeFeatureInfoFactory.h>

+ Inheritance diagram for KoOpenTypeFeatureInfoFactory:

Public Member Functions

KoOpenTypeFeatureInfo infoByTag (const QLatin1String &tag) const
 infoByTag
 
 KoOpenTypeFeatureInfoFactory ()
 
QList< QString > tags () const
 tags
 
 ~KoOpenTypeFeatureInfoFactory ()
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Public Attributes

QMap< QString, KoOpenTypeFeatureInfoinfoMap
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Private Attributes

QScopedPointer< Privated
 

Detailed Description

The KoOpenTypeFeatureInfoFactory class.

This returns KoOpenTypeFeatureInfo's for the given tag.

Definition at line 12 of file KoOpenTypeFeatureInfoFactory.cpp.

Constructor & Destructor Documentation

◆ KoOpenTypeFeatureInfoFactory()

KoOpenTypeFeatureInfoFactory::KoOpenTypeFeatureInfoFactory ( )

Definition at line 17 of file KoOpenTypeFeatureInfoFactory.cpp.

18 : d(new Private)
19{
21
22 // General discretionary features
23 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("aalt"),
24 i18nc("@title", "Access All Alternates"),
25 i18nc("@tooltip", "Access any possible substitutions."),
27 true));
28 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("calt"),
29 i18nc("@title", "Contextual Alternates"),
30 i18nc("@tooltip", "Replaces glyphs depending on their context within a text."),
32 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("clig"),
33 i18nc("@title", "Contextual Ligatures"),
34 i18nc("@tooltip", "Replaces sequences of glyphs with ligatures depending on their context within a text."),
36 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("cswh"),
37 i18nc("@title", "Contextual Swash"),
38 i18nc("@tooltip", "Replaces glyphs with swashed glyphs depending on their context within a text."),
40 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("dlig"),
41 i18nc("@title", "Discretionary Ligatures"),
42 i18nc("@tooltip", "Replaces sequences of glyphs with ligatures intended for typographic effect."),
44 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("falt"),
45 i18nc("@title", "Final Glyph on Line Alternates"),
46 i18nc("@tooltip", "Replaces glyphs with their line-end forms."),
48 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("hist"),
49 i18nc("@title", "Historical Forms"),
50 i18nc("@tooltip", "Replaces glyphs with their historical forms."),
52 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("hlig"),
53 i18nc("@title", "Historical Forms"),
54 i18nc("@tooltip", "Replaces sequences glyphs with ligatures that were in use in the past, but rare today."),
56 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("jalt"),
57 i18nc("@title", "Justification Alternates"),
58 i18nc("@tooltip", "Replaces glyphs with their alternates meant for justification."),
60 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("liga"),
61 i18nc("@title", "Standard Ligatures"),
62 i18nc("@tooltip", "Replaces sequences glyphs with common ligatures."),
64 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("lfbd"),
65 i18nc("@title", "Left Bounds"),
66 i18nc("@tooltip", "This adjusts glyphs so there is no space at the left side."),
68 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("locl"),
69 i18nc("@title", "Localized Forms"),
70 i18nc("@tooltip", "This replaces glyphs with language specific versions."),
72 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("opbd"),
73 i18nc("@title", "Optical Bounds"),
74 i18nc("@tooltip", "Adjusts glyphs so they align by their optical bounds. Doesn't do anything in Krita."),
76 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ornm"),
77 i18nc("@title", "Ornaments"),
78 i18nc("@tooltip", "Replaces glyphs with ornaments for decorative purposes."),
80 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rand"),
81 i18nc("@title", "Randomize"),
82 i18nc("@tooltip", "Replaces glyphs with random alternates."),
84 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rtbd"),
85 i18nc("@title", "Right Bounds"),
86 i18nc("@tooltip", "This adjusts glyphs so there is no space at the right side."),
88 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("salt"),
89 i18nc("@title", "Stylistic Alternates"),
90 i18nc("@tooltip", "Replaces glyphs with stylistic alternates that do not fit in other categories."),
92 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("swsh"),
93 i18nc("@title", "Swash"),
94 i18nc("@tooltip", "Replaces glyphs with swashed alternates."),
96
97 // General required features.
98 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ccmp"),
99 i18nc("@title", "Glyph Composition/Decomposition"),
100 i18nc("@tooltip", "This composes or decomposes graphemes so that the resulting glyphs can later be recomposed. Commonly used to handle diacritics."),
102 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("kern"),
103 i18nc("@title", "Kerning"),
104 i18nc("@tooltip", "This controls kerning on the font."),
106 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("mark"),
107 i18nc("@title", "Mark Positioning"),
108 i18nc("@tooltip", "This controls the positioning of mark glyphs on base glyphs. Commonly used for diacritics."),
110 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("mkmk"),
111 i18nc("@title", "Mark Positioning"),
112 i18nc("@tooltip", "This controls the positioning of mark glyphs onto other mark glyphs. Commonly used for diacritics."),
114 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rclt"),
115 i18nc("@title", "Required Contextual Alternates"),
116 i18nc("@tooltip", "Replaces glyphs contextually with alternates, required to make the font work."),
118 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rlig"),
119 i18nc("@title", "Required Ligatures"),
120 i18nc("@tooltip", "Replaces sequences of glyphs with required ligatures."),
122 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rvrn"),
123 i18nc("@title", "Required Variation Alternates"),
124 i18nc("@tooltip", "Replaces glyphs in a variable font with ones suited for the current variation."),
126 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("size"),
127 i18nc("@title", "Optical size"),
128 i18nc("@tooltip", "Indicates how much the font is suitable for its current size. Does nothing in Krita."),
130 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vkrn"),
131 i18nc("@title", "Vertical Kerning"),
132 i18nc("@tooltip", "This controls vertical kerning on the font."),
134
135 // Number and math features.
136 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("afrc"),
137 i18nc("@title", "Alternative Fractions"),
138 i18nc("@tooltip", "Replaces figures separated by a slash with a nut fraction form."),
140 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("dnom"),
141 i18nc("@title", "Denominators"),
142 i18nc("@tooltip", "Replaces figures with forms that are suited to represent the denominator in a fraction."),
144 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("dtls"),
145 i18nc("@title", "Dotless Forms"),
146 i18nc("@tooltip", "Replaces dotted letters such as i and j with dotless forms, for use in mathematical formula."),
148 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("flac"),
149 i18nc("@title", "Flattened accent forms"),
150 i18nc("@tooltip", "Replaces accents on capital letters with flattened forms."),
152 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("frac"),
153 i18nc("@title", "Fractions"),
154 i18nc("@tooltip", "Replaces figures separated by a slash with a proper diagonal fraction form. If a font has the numerator and denominator features, and the numbers are separated by a 'fraction slash' (U+2044), then this will replace the figures with numerators before the slash and denominators after the slash."),
156 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("lnum"),
157 i18nc("@title", "Lining Figures"),
158 i18nc("@tooltip", "Replaces oldstyle figures with lining figures, which harmonize well with uppercase letters."),
160 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("mgrk"),
161 i18nc("@title", "Mathematical Greek"),
162 i18nc("@tooltip", "Replaces normal Greek script with glyphs intended for mathematical usage."),
164 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("nalt"),
165 i18nc("@title", "Alternate Annotation Forms"),
166 i18nc("@tooltip", "Replaces figures and letters with notational forms, like encircled."),
168 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("numr"),
169 i18nc("@title", "Numerators"),
170 i18nc("@tooltip", "Replaces figures with forms that are suited to represent the numerator in a fraction."),
172 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("onum"),
173 i18nc("@title", "Oldstyle Figures"),
174 i18nc("@tooltip", "Replaces lining figures with oldstyle figures, which harmonize well with lowercase letters."),
176 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ordn"),
177 i18nc("@title", "Ordinals"),
178 i18nc("@tooltip", "Replaces letters that follow figures with their ordinal forms."),
180 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("pnum"),
181 i18nc("@title", "Proportional Figures"),
182 i18nc("@tooltip", "Replaces tabular figures with proportional figures."),
184 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("sinf"),
185 i18nc("@title", "Scientific Inferiors"),
186 i18nc("@tooltip", "Replaces glyphs with forms that are suited for displaying the number in chemical formulas."),
188 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ssty"),
189 i18nc("@title", "Math script style alternates"),
190 i18nc("@tooltip", "Replaces glyphs with ones more suited for super- and subscripts."),
192 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("subs"),
193 i18nc("@title", "Subscript"),
194 i18nc("@tooltip", "Replaces glyphs with ones more suited for subscript."),
196 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("sups"),
197 i18nc("@title", "Superscript"),
198 i18nc("@tooltip", "Replaces glyphs with ones more suited for superscript."),
200 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("tnum"),
201 i18nc("@title", "Tabular Figures"),
202 i18nc("@tooltip", "Replaces proportional figures with tabular figures."),
204 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("zero"),
205 i18nc("@title", "Slashed Zero"),
206 i18nc("@tooltip", "Replaces the number zero with one that has a slash in the middle, which can help prevent confusion with similar glyphs like the letter 'O'."),
208
209 // LGC and other bicarmel features.
210 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("case"),
211 i18nc("@title", "Case-Sensitive Forms"),
212 i18nc("@tooltip", "Adjusts glyphs to work better with text that consists of only capitals or lining figures."),
214 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("cpsp"),
215 i18nc("@title", "Capital Spacing"),
216 i18nc("@tooltip", "Adjusts inter-glyph spacing for all-capital text."),
218 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("c2pc"),
219 i18nc("@title", "Petite Capitals From Capitals"),
220 i18nc("@tooltip", "Replaces uppercase letters with petite capital forms, which are closer to the x-height of a font than small capital forms."),
222 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("c2sc"),
223 i18nc("@title", "Small Capitals From Capitals"),
224 i18nc("@tooltip", "Replaces uppercase letters with small capital forms."),
226 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("pcap"),
227 i18nc("@title", "Petite Capitals"),
228 i18nc("@tooltip", "Replaces lowercase letters with petite capital forms, which are closer to the x-height of a font than small capital forms."),
230 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("smcp"),
231 i18nc("@title", "Small Capitals"),
232 i18nc("@tooltip", "Replaces lowercase letters with small capital forms."),
234 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("titl"),
235 i18nc("@title", "Titling"),
236 i18nc("@tooltip", "Replaces glyphs with alternate forms suited for header text."),
238 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("unic"),
239 i18nc("@title", "Unicase"),
240 i18nc("@tooltip", "Replaces both upper and lowercase glyphs with unicase glyphs."),
242
243 // Indic and other brahmic-derived script features.
244 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("abvf"),
245 i18nc("@title", "Above-base Forms"),
246 i18nc("@tooltip", "Controls substitution for above base forms in Khmer and other Indic scripts"),
248 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("abvm"),
249 i18nc("@title", "Above-base Mark Positioning"),
250 i18nc("@tooltip", "Controls above-base mark positioning for Indic scripts."),
252 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("abvs"),
253 i18nc("@title", "Above-base Substitutions"),
254 i18nc("@tooltip", "Controls above-base mark ligatures for Indic scripts."),
256 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("akhn"),
257 i18nc("@title", "Akhand"),
258 i18nc("@tooltip", "Controls Akhand ligatures for Indic scripts."),
260 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("blwf"),
261 i18nc("@title", "Below-base Forms"),
262 i18nc("@tooltip", "Controls substitution for below base forms in Indic scripts."),
264 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("blwm"),
265 i18nc("@title", "Below-base Mark Positioning"),
266 i18nc("@tooltip", "Controls below-base mark positioning for Indic scripts."),
268 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("blws"),
269 i18nc("@title", "Below-base Substitutions"),
270 i18nc("@tooltip", "Controls below-base mark ligatures for Indic scripts."),
272 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("cfar"),
273 i18nc("@title", "Conjunct Form After Ro"),
274 i18nc("@tooltip", "Controls glyphs following conjoined Ro in Khmer script."),
276 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("cjct"),
277 i18nc("@title", "Conjunct Forms"),
278 i18nc("@tooltip", "Controls conjunct forms in Indic scripts."),
280 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("dist"),
281 i18nc("@title", "Distances"),
282 i18nc("@tooltip", "Controls distances in Indic scripts, to avoid collisions."),
284 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("half"),
285 i18nc("@title", "Half Forms"),
286 i18nc("@tooltip", "Replaces consonants in Indic scripts with their half forms."),
288 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("haln"),
289 i18nc("@title", "Halant Forms"),
290 i18nc("@tooltip", "Replaces consonants in Indic scripts with their halant forms."),
292 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("nukt"),
293 i18nc("@title", "Nukta Forms"),
294 i18nc("@tooltip", "Replaces consonants combined with Nukta in Indic scripts with their Nukta forms."),
296 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("pref"),
297 i18nc("@title", "Pre-base Forms"),
298 i18nc("@tooltip", "Replaces the pre-base form of a consonant in Khmer script, when a 'Coeng Ra' situation occurs."),
300 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("pres"),
301 i18nc("@title", "Pre-base Substitutions"),
302 i18nc("@tooltip", "Replaces consonants with their pre-base forms in Indic scripts."),
304 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("pstf"),
305 i18nc("@title", "Post-base Forms"),
306 i18nc("@tooltip", "Replaces consonants with their post-base forms in Gurmukhi, Malayalam, and Khmer."),
308 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("psts"),
309 i18nc("@title", "Post-base Substitutions"),
310 i18nc("@tooltip", "Replaces base glyphs and post-base glyphs with a ligature in Indic scripts."),
312 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rkrf"),
313 i18nc("@title", "Rakar Forms"),
314 i18nc("@tooltip", "Replaces sequences of glyphs in Indic scripts with their Rakar forms."),
316 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rphf"),
317 i18nc("@title", "Reph Form"),
318 i18nc("@tooltip", "Replaces Reph forms in Indic scripts with a consonant and Halant sequence."),
320 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vatu"),
321 i18nc("@title", "Vattu Variants"),
322 i18nc("@tooltip", "Replaces ligatures in Indic scripts with a base consonant and Vattu form."),
324
325 // CJK features.
326 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("chws"),
327 i18nc("@title", "Contextual Half-width Spacing"),
328 i18nc("@tooltip", "Respaces full-width glyphs to be half-width depending on the context, common examples include CJK full-width brackets and other punctuation marks."),
330 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("cpct"),
331 i18nc("@title", "Centered CJK Punctuation"),
332 i18nc("@tooltip", "Adjusts non-centered punctuation to be centered in CJK scripts."),
334 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("expt"),
335 i18nc("@title", "Expert Forms"),
336 i18nc("@tooltip", "Replaces standard forms in Japanese fonts with expert forms."),
338 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("fwid"),
339 i18nc("@title", "Full Widths"),
340 i18nc("@tooltip", "Replaces or respaces proportional glyphs with full-width glyphs."),
342 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("chws"),
343 i18nc("@title", "Contextual Half-width Spacing"),
344 i18nc("@tooltip", "Respaces full-width glyphs to be half-width, common examples include CJK full-width brackets and other punctuation marks."),
346 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("hkna"),
347 i18nc("@title", "Horizontal Kana Alternates"),
348 i18nc("@tooltip", "Replaces standard kana in Japanese fonts with ones suited for horizontal layout."),
350 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("hngl"),
351 i18nc("@title", "Hangul"),
352 i18nc("@tooltip", "Replaces hanja in Korean with the corresponding hangul. Deprecated."),
354 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("hojo"),
355 i18nc("@title", "Hojo Kanji Forms"),
356 i18nc("@tooltip", "Replaces 'JIS X 0213:2004' form kanji in Japanese fonts with the Hojo ('JIS X 0212-1990') forms."),
358 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("hwid"),
359 i18nc("@title", "Half Widths"),
360 i18nc("@tooltip", "Replaces or respaces proportional or full-width glyphs with half-width glyphs."),
362 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ital"),
363 i18nc("@title", "Italics"),
364 i18nc("@tooltip", "Replaces Latin glyphs in a CJK font with their italic forms."),
366 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("jp78"),
367 i18nc("@title", "JIS78 Forms"),
368 i18nc("@tooltip", "Replaces standard form kanji in Japanese fonts with the JIS78 forms."),
370 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("jp83"),
371 i18nc("@title", "JIS83 Forms"),
372 i18nc("@tooltip", "Replaces standard form kanji in Japanese fonts with the JIS83 forms."),
374 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("jp90"),
375 i18nc("@title", "JIS90 Forms"),
376 i18nc("@tooltip", "Replaces standard form kanji in Japanese fonts with the JIS90 forms."),
378 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("jp04"),
379 i18nc("@title", "JIS2004 Forms"),
380 i18nc("@tooltip", "Replaces standard form kanji in Japanese fonts with the JIS2004 forms."),
382 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ljmo"),
383 i18nc("@title", "Leading Jamo Forms"),
384 i18nc("@tooltip", "Replaces sequences of leading class Hangul Jamo with a combined leading form."),
386 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("nlck"),
387 i18nc("@title", "NLC Kanji Forms"),
388 i18nc("@tooltip", "Replaces standard form kanji in Japanese fonts with the NLC forms."),
390 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("palt"),
391 i18nc("@title", "Proportional Alternate Widths"),
392 i18nc("@tooltip", "Respaces full-width glyphs to fit in a proportional context."),
394 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("pkna"),
395 i18nc("@title", "Proportional Kana"),
396 i18nc("@tooltip", "Replaces full-width kana in Japanese fonts with proportional kana."),
398 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("pwid"),
399 i18nc("@title", "Proportional Widths"),
400 i18nc("@tooltip", "Replaces uniform-width glyphs with proportional glyphs."),
402 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("qwid"),
403 i18nc("@title", "Quarter Widths"),
404 i18nc("@tooltip", "Replaces glyphs with quarter-width glyphs."),
406 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ruby"),
407 i18nc("@title", "Ruby Notation Forms"),
408 i18nc("@tooltip", "Replaces glyphs in CJK fonts with ones suited for the small text in ruby annotations."),
410 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("smpl"),
411 i18nc("@title", "Simplified Forms"),
412 i18nc("@tooltip", "Replaces glyphs in CJK fonts with 'simplified' forms."),
414 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("tjmo"),
415 i18nc("@title", "Trailing Jamo Forms"),
416 i18nc("@tooltip", "Replaces sequences of trailing class Hangul Jamo with a combined trailing form."),
418 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("tnam"),
419 i18nc("@title", "Traditional Name Forms"),
420 i18nc("@tooltip", "Replaces standard form Kanji in Japanese fonts with the ones traditionally used in names."),
422 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("trad"),
423 i18nc("@title", "Traditional Forms"),
424 i18nc("@tooltip", "Replaces glyphs in CJK fonts with 'traditional' forms."),
426 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("twid"),
427 i18nc("@title", "Third Widths"),
428 i18nc("@tooltip", "Replaces glyphs with third-width glyphs."),
430 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("valt"),
431 i18nc("@title", "Alternate Vertical Metrics"),
432 i18nc("@tooltip", "Repositions glyphs so they look more appropriate in vertical layout."),
434 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("halt"),
435 i18nc("@title", "Alternate Half Widths"),
436 i18nc("@tooltip", "Repositions glyphs so they look more appropriate in horizontal layout."),
438 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vchw"),
439 i18nc("@title", "Vertical Contextual Half-width Spacing"),
440 i18nc("@tooltip", "Respaces full-width glyphs to be half-width depending on the context, common examples include CJK full-width brackets and other punctuation marks."),
442 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vert"),
443 i18nc("@title", "Vertical Alternates"),
444 i18nc("@tooltip", "Replaces glyphs in CJK fonts with ones suited for vertical writing."),
446 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vhal"),
447 i18nc("@title", "Alternate Vertical Half Metrics"),
448 i18nc("@tooltip", "Repositions glyphs so they are half-width in a vertical writing context."),
450 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vjmo"),
451 i18nc("@title", "Vowel Jamo Forms"),
452 i18nc("@tooltip", "Replaces sequences of vowel class Hangul Jamo with a combined vowel form."),
454 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vkna"),
455 i18nc("@title", "Vertical Kana Alternates"),
456 i18nc("@tooltip", "Replaces standard kana in Japanese fonts with ones suited for vertical layout."),
458 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vpal"),
459 i18nc("@title", "Proportional Alternate Vertical Metrics"),
460 i18nc("@tooltip", "Repositions glyphs so they are proportional in a vertical writing context."),
462 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vrtr"),
463 i18nc("@title", "Vertical Alternates for Rotation"),
464 i18nc("@tooltip", "Replaces a subset of glyphs with rotated variants for vertical layout."),
466 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("vrt2"),
467 i18nc("@title", "Vertical Alternates and Rotation"),
468 i18nc("@tooltip", "Replaces all horizontal-script glyphs with rotated variants for vertical layout."),
470
471 // Arabic and other RTL joined script features
472 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("curs"),
473 i18nc("@title", "Cursive Positioning"),
474 i18nc("@tooltip", "Adjusts the position of glyphs so they cursively connect."),
476 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("fina"),
477 i18nc("@title", "Terminal Forms"),
478 i18nc("@tooltip", "Replaces the final glyph in a sequence of glyphs in a joined script with its end form."),
480 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("fin2"),
481 i18nc("@title", "Terminal Form #2"),
482 i18nc("@tooltip", "Replaces the Alaph glyph at the end of Syriac words with its appropriate form."),
484 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("fin3"),
485 i18nc("@title", "Terminal Form #3"),
486 i18nc("@tooltip", "Replaces the Alaph glyph at the end of Syriac words with its appropriate form, when neither Terminal forms or Terminal forms 2 are applicable."),
488 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("init"),
489 i18nc("@title", "Initial Forms"),
490 i18nc("@tooltip", "Replaces the first glyph in a sequence of glyphs in a joined script with its start form."),
492 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("isol"),
493 i18nc("@title", "Initial Forms"),
494 i18nc("@tooltip", "Replaces a glyph in a sequence of glyphs in a joined script with its isolated form."),
496 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ltra"),
497 i18nc("@title", "Left-to-right glyph alternates"),
498 i18nc("@tooltip", "Replaces glyphs with their left-to-right alternates."),
500 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("ltrm"),
501 i18nc("@title", "Left-to-right mirrored forms"),
502 i18nc("@tooltip", "Replaces glyphs with their left-to-right mirrored forms."),
504 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("medi"),
505 i18nc("@title", "Medial Forms"),
506 i18nc("@tooltip", "Replaces glyphs in the middle of a sequence of glyphs in a joined script with their medial forms."),
508 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("med2"),
509 i18nc("@title", "Medial Forms #2"),
510 i18nc("@tooltip", "Replaces the Alaph glyph in the middle of Syriac words with its appropriate form."),
512 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("mset"),
513 i18nc("@title", "mset"),
514 i18nc("@tooltip", "Positions Arabic combining marks in fonts for Windows 95 using glyph substitution."),
516 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rtla"),
517 i18nc("@title", "Right-to-left glyph alternates"),
518 i18nc("@tooltip", "Replaces glyphs with their right-to-left alternates."),
520 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("rtlm"),
521 i18nc("@title", "Right-to-left mirrored forms"),
522 i18nc("@tooltip", "Replaces glyphs with their right-to-left mirrored forms."),
524 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String("stch"),
525 i18nc("@title", "Stretching Glyph Decomposition"),
526 i18nc("@tooltip", "Replaces glyphs that need to stretch with stretchable glyphs."),
528
529 //stylistic sets
530 for (int i = 1; i <= 20; i++) {
531 char *tag{new char[4]{'s', 's', '0', '0'}};
532 tag[2] = (i/10) + '0';
533 tag[3] = (i%10) + '0';
534
535 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String(tag, 4),
536 i18nc("@title", "Stylistic Set %1", i),
537 i18nc("@tooltip", "Replaces glyphs with alternates."),
539 }
540
541
542 //character variants
543 for (int i = 1; i <= 99; i++) {
544 char *tag{new char[4]{'c', 'v', '0', '0'}};
545 tag[2] = (i/10) + '0';
546 tag[3] = (i%10) + '0';
547
548 initialMap.append(KoOpenTypeFeatureInfo(QLatin1String(tag, 4),
549 i18nc("@title", "Character Variant %1", i),
550 i18nc("@tooltip", "Replaces glyphs with alternates."),
552 }
553
554 Q_FOREACH(KoOpenTypeFeatureInfo feature, initialMap) {
555 d->infoMap.insert(feature.tag, feature);
556 }
557}
@ GPOS8
Chained-Contextual positioning.
@ GSUB2
Multiple substitution (1 -> 2)
@ GPOS2
Pair position adjustment.
@ GSUB8
Reverse Chained Contextual substitution.
@ GPOS1
Single position adjustment.
@ GSUB3
Alternate substitution.
@ GPOS4
Mark-to-base adjustment.
@ GPOS5
Mark-to-ligature adjustment.
@ GSUB5
Contextual substitution.
@ GPOS6
Mark-to-mark adjustment.
@ GSUB6
Chained Contextual substitution.

References d, KoOpenTypeFeatureInfo::GPOS1, KoOpenTypeFeatureInfo::GPOS2, KoOpenTypeFeatureInfo::GPOS3, KoOpenTypeFeatureInfo::GPOS4, KoOpenTypeFeatureInfo::GPOS5, KoOpenTypeFeatureInfo::GPOS6, KoOpenTypeFeatureInfo::GPOS8, KoOpenTypeFeatureInfo::GSUB1, KoOpenTypeFeatureInfo::GSUB2, KoOpenTypeFeatureInfo::GSUB3, KoOpenTypeFeatureInfo::GSUB4, KoOpenTypeFeatureInfo::GSUB5, KoOpenTypeFeatureInfo::GSUB6, KoOpenTypeFeatureInfo::GSUB8, and KoOpenTypeFeatureInfo::tag.

◆ ~KoOpenTypeFeatureInfoFactory()

KoOpenTypeFeatureInfoFactory::~KoOpenTypeFeatureInfoFactory ( )

Definition at line 559 of file KoOpenTypeFeatureInfoFactory.cpp.

560{
561}

Member Function Documentation

◆ infoByTag()

KoOpenTypeFeatureInfo KoOpenTypeFeatureInfoFactory::infoByTag ( const QLatin1String & tag) const

infoByTag

Parameters
tag– the opentype tag for a given feature. Note that it is possible for Fonts to have custom features, in this case a generic KoOpenTypeFeatureInfo will be returned.
Returns
KoOpenTypeFeatureInfo for a given tag.

Definition at line 563 of file KoOpenTypeFeatureInfoFactory.cpp.

564{
565 KoOpenTypeFeatureInfo def(tag, QString(), QString(), {});
566 return d->infoMap.value(tag, def);
567}

References d.

◆ tags()

QList< QString > KoOpenTypeFeatureInfoFactory::tags ( ) const

tags

Returns
all the tags we have prepared KoOpenTypeFeatureInfo for.

Definition at line 569 of file KoOpenTypeFeatureInfoFactory.cpp.

570{
571 return d->infoMap.keys();
572}

References d.

Member Data Documentation

◆ d

QScopedPointer<Private> KoOpenTypeFeatureInfoFactory::d
private

Definition at line 101 of file KoOpenTypeFeatureInfoFactory.h.

◆ infoMap

QMap<QString, KoOpenTypeFeatureInfo> KoOpenTypeFeatureInfoFactory::infoMap

Definition at line 14 of file KoOpenTypeFeatureInfoFactory.cpp.


The documentation for this class was generated from the following files: