blob: ce7c36c555698288f4366f842476525140b12174 [file] [log] [blame]
Cary Clarkcb6bef02018-11-29 12:05:25 -05001#Topic Font
2#Alias Font_Reference ##
3
4#Subtopic Advance
5# incomplete, should probably be in overview, not reference
6##
7#Subtopic Engine
8# incomplete, should probably be in overview, not reference
9##
10
11#Code
12#Populate
13##
14
15# ------------------------------------------------------------------------------
16
17#Class SkFont
18
19SkFont controls options applied when drawing and measuring text.
20
21#Code
22#Populate
23##
24
25# ------------------------------------------------------------------------------
26
27#EnumClass Edging
28
29#Code
30#Populate
31##
32
33Whether edge pixels draw opaque or with partial transparency.
34
35#Const kAlias 0 # incomplete; replace '0' with member value
36#Line # no transparent pixels on glyph edges ##
37# incomplete; add description or delete
38##
39#Const kAntiAlias 0 # incomplete; replace '0' with member value
40#Line # may have transparent pixels on glyph edges ##
41# incomplete; add description or delete
42##
43#Const kSubpixelAntiAlias 0 # incomplete; replace '0' with member value
44#Line # glyph positioned in pixel using transparency ##
45# incomplete; add description or delete
46##
47
48# incomplete; add description or delete
49
50#Example
51// incomplete
52##
53
54#SeeAlso incomplete
55
56#EnumClass ##
57
58# ------------------------------------------------------------------------------
59
60#Enum Hinting
61
62#Code
63#Populate
64##
65
66Amount of font hinting applied to glyph outlines.
67
68#Const kNo_Hinting 0 # incomplete; replace '0' with member value
69#Line # glyph outlines unchanged ##
70# incomplete; add description or delete
71##
72#Const kSlight_Hinting 0 # incomplete; replace '0' with member value
73#Line # minimal modification to improve constrast ##
74# incomplete; add description or delete
75##
76#Const kNormal_Hinting 0 # incomplete; replace '0' with member value
77#Line # glyph outlines modified to improve constrast ##
78# incomplete; add description or delete
79##
80#Const kFull_Hinting 0 # incomplete; replace '0' with member value
81#Line # modifies glyph outlines for maximum constrast ##
82# incomplete; add description or delete
83##
84
85# incomplete; add description or delete
86
87#Example
88// incomplete
89##
90
91#SeeAlso incomplete
92
93#Enum ##
94
95# ------------------------------------------------------------------------------
96
97#Method SkFont()
98#In Constructor
99#Line # incomplete ##
100
101#Populate
102
103#Example
104// incomplete
105##
106
107#SeeAlso incomplete
108
109#Method ##
110
111# ------------------------------------------------------------------------------
112
113#Method SkFont(sk_sp<SkTypeface> typeface, SkScalar size)
114#In Constructor
115#Line # incomplete ##
116
117#Populate
118
119#Example
120// incomplete
121##
122
123#SeeAlso incomplete
124
125#Method ##
126
127# ------------------------------------------------------------------------------
128
129#Method SkFont(sk_sp<SkTypeface> typeface, SkScalar size, SkScalar scaleX, SkScalar skewX)
130#In Constructor
131#Line # incomplete ##
132
133#Populate
134
135#Example
136// incomplete
137##
138
139#SeeAlso incomplete
140
141#Method ##
142
143# ------------------------------------------------------------------------------
144
145#Method bool operator==(const SkFont& font) const
146#In Operator
147#Line # compares fonts for equality ##
148
149#Populate
150
151#Example
152// incomplete
153##
154
155#SeeAlso incomplete
156
157#Method ##
158
159# ------------------------------------------------------------------------------
160
161#Method bool isForceAutoHinting() const
162#In incomplete
163#Line # incomplete ##
164
165#Populate
166
167#Example
168// incomplete
169##
170
171#SeeAlso incomplete
172
173#Method ##
174
175# ------------------------------------------------------------------------------
176
177#Method bool isEmbeddedBitmaps() const
178#In incomplete
179#Line # incomplete ##
180
181#Populate
182
183#Example
184// incomplete
185##
186
187#SeeAlso incomplete
188
189#Method ##
190
191# ------------------------------------------------------------------------------
192
193#Method bool isSubpixel() const
194#In incomplete
195#Line # incomplete ##
196
197#Populate
198
199#Example
200// incomplete
201##
202
203#SeeAlso incomplete
204
205#Method ##
206
207# ------------------------------------------------------------------------------
208
209#Method bool isLinearMetrics() const
210#In incomplete
211#Line # incomplete ##
212
213#Populate
214
215#Example
216// incomplete
217##
218
219#SeeAlso incomplete
220
221#Method ##
222
223# ------------------------------------------------------------------------------
224
225#Method bool isEmbolden() const
226#In incomplete
227#Line # incomplete ##
228
229#Populate
230
231#Example
232// incomplete
233##
234
235#SeeAlso incomplete
236
237#Method ##
238
239# ------------------------------------------------------------------------------
240
241#Method void setForceAutoHinting(bool forceAutoHinting)
242#In incomplete
243#Line # incomplete ##
244
245#Populate
246
247#Example
248// incomplete
249##
250
251#SeeAlso incomplete
252
253#Method ##
254
255# ------------------------------------------------------------------------------
256
257#Method void setEmbeddedBitmaps(bool embeddedBitmaps)
258#In incomplete
259#Line # incomplete ##
260
261#Populate
262
263#Example
264// incomplete
265##
266
267#SeeAlso incomplete
268
269#Method ##
270
271# ------------------------------------------------------------------------------
272
273#Method void setSubpixel(bool subpixel)
274#In incomplete
275#Line # incomplete ##
276
277#Populate
278
279#Example
280// incomplete
281##
282
283#SeeAlso incomplete
284
285#Method ##
286
287# ------------------------------------------------------------------------------
288
289#Method void setLinearMetrics(bool linearMetrics)
290#In incomplete
291#Line # incomplete ##
292
293#Populate
294
295#Example
296// incomplete
297##
298
299#SeeAlso incomplete
300
301#Method ##
302
303# ------------------------------------------------------------------------------
304
305#Method void setEmbolden(bool embolden)
306#In incomplete
307#Line # incomplete ##
308
309#Populate
310
311#Example
312// incomplete
313##
314
315#SeeAlso incomplete
316
317#Method ##
318
319# ------------------------------------------------------------------------------
320
321#Method Edging getEdging() const
322#In incomplete
323#Line # incomplete ##
324
325#Populate
326
327#Example
328// incomplete
329##
330
331#SeeAlso incomplete
332
333#Method ##
334
335# ------------------------------------------------------------------------------
336
337#Method void setEdging(Edging edging)
338#In incomplete
339#Line # incomplete ##
340
341#Populate
342
343#Example
344// incomplete
345##
346
347#SeeAlso incomplete
348
349#Method ##
350
351# ------------------------------------------------------------------------------
352
353#Method void setHinting(SkFontHinting hintingLevel)
354#In incomplete
355#Line # incomplete ##
356
357#Populate
358
359#Example
360// incomplete
361##
362
363#SeeAlso incomplete
364
365#Method ##
366
367# ------------------------------------------------------------------------------
368
369#Method SkFontHinting getHinting() const
370#In incomplete
371#Line # incomplete ##
372
373#Populate
374
375#Example
376// incomplete
377##
378
379#SeeAlso incomplete
380
381#Method ##
382
383# ------------------------------------------------------------------------------
384
385#Method SkFont makeWithSize(SkScalar size) const
386#In incomplete
387#Line # incomplete ##
388
389#Populate
390
391#Example
392// incomplete
393##
394
395#SeeAlso incomplete
396
397#Method ##
398
399# ------------------------------------------------------------------------------
400
401#Method SkTypeface* getTypeface() const
402#In incomplete
403#Line # incomplete ##
404
405#Populate
406
407#Example
408// incomplete
409##
410
411#SeeAlso incomplete
412
413#Method ##
414
415# ------------------------------------------------------------------------------
416
417#Method SkScalar getSize() const
418#In incomplete
419#Line # incomplete ##
420
421#Populate
422
423#Example
424// incomplete
425##
426
427#SeeAlso incomplete
428
429#Method ##
430
431# ------------------------------------------------------------------------------
432
433#Method SkScalar getScaleX() const
434#In incomplete
435#Line # incomplete ##
436
437#Populate
438
439#Example
440// incomplete
441##
442
443#SeeAlso incomplete
444
445#Method ##
446
447# ------------------------------------------------------------------------------
448
449#Method SkScalar getSkewX() const
450#In incomplete
451#Line # incomplete ##
452
453#Populate
454
455#Example
456// incomplete
457##
458
459#SeeAlso incomplete
460
461#Method ##
462
463# ------------------------------------------------------------------------------
464
465#Method sk_sp<SkTypeface> refTypeface() const
466#In incomplete
467#Line # incomplete ##
468
469#Populate
470
471#Example
472// incomplete
473##
474
475#SeeAlso incomplete
476
477#Method ##
478
479# ------------------------------------------------------------------------------
480
481#Method void setTypeface(sk_sp<SkTypeface> tf)
482#In incomplete
483#Line # incomplete ##
484
485#Populate
486
487#Example
488// incomplete
489##
490
491#SeeAlso incomplete
492
493#Method ##
494
495# ------------------------------------------------------------------------------
496
497#Method void setSize(SkScalar textSize)
498#In incomplete
499#Line # incomplete ##
500
501#Populate
502
503#Example
504// incomplete
505##
506
507#SeeAlso incomplete
508
509#Method ##
510
511# ------------------------------------------------------------------------------
512
513#Method void setScaleX(SkScalar scaleX)
514#In incomplete
515#Line # incomplete ##
516
517#Populate
518
519#Example
520// incomplete
521##
522
523#SeeAlso incomplete
524
525#Method ##
526
527# ------------------------------------------------------------------------------
528
529#Method void setSkewX(SkScalar skewX)
530#In incomplete
531#Line # incomplete ##
532
533#Populate
534
535#Example
536// incomplete
537##
538
539#SeeAlso incomplete
540
541#Method ##
542
543# ------------------------------------------------------------------------------
544
545#Method int textToGlyphs(const void* text, size_t byteLength, SkTextEncoding encoding,
546 SkGlyphID glyphs[], int maxGlyphCount) const
547#In incomplete
548#Line # incomplete ##
549
550#Populate
551
552#Example
553// incomplete
554##
555
556#SeeAlso incomplete
557
558#Method ##
559
560# ------------------------------------------------------------------------------
561
562#Method uint16_t unicharToGlyph(SkUnichar uni) const
563#In incomplete
564#Line # incomplete ##
565
566#Populate
567
568#Example
569// incomplete
570##
571
572#SeeAlso incomplete
573
574#Method ##
575
576# ------------------------------------------------------------------------------
577
578#Method int countText(const void* text, size_t byteLength, SkTextEncoding encoding) const
579#In incomplete
580#Line # incomplete ##
581
582#Populate
583
584#Example
585// incomplete
586##
587
588#SeeAlso incomplete
589
590#Method ##
591
592# ------------------------------------------------------------------------------
593
594#Method bool containsText(const void* text, size_t byteLength, SkTextEncoding encoding) const
595#In incomplete
596#Line # incomplete ##
597
598#Populate
599
600#Example
601// incomplete
602##
603
604#SeeAlso incomplete
605
606#Method ##
607
608# ------------------------------------------------------------------------------
609
610#Method SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding encoding,
611 SkRect* bounds = nullptr) const
612#In incomplete
613#Line # incomplete ##
614
615#Populate
616
617#Example
618// incomplete
619##
620
621#SeeAlso incomplete
622
623#Method ##
624
625# ------------------------------------------------------------------------------
626
627#Method bool getPath(uint16_t glyphID, SkPath* path) const
628#In incomplete
629#Line # incomplete ##
630
631#Populate
632
633#Example
634// incomplete
635##
636
637#SeeAlso incomplete
638
639#Method ##
640
641# ------------------------------------------------------------------------------
642
643#Method void getPaths(const uint16_t glyphIDs[], int count,
644 void (*glyphPathProc)(const SkPath* pathOrNull, const SkMatrix& mx, void* ctx),
645 void* ctx) const
646#In incomplete
647#Line # incomplete ##
648
649#Populate
650
651#Example
652// incomplete
653##
654
655#SeeAlso incomplete
656
657#Method ##
658
659# ------------------------------------------------------------------------------
660
661#Method SkScalar getMetrics(SkFontMetrics* metrics) const
662#In incomplete
663#Line # incomplete ##
664
665#Populate
666
667#Example
668// incomplete
669##
670
671#SeeAlso incomplete
672
673#Method ##
674
675# ------------------------------------------------------------------------------
676
677#Method SkScalar getSpacing() const
678#In incomplete
679#Line # incomplete ##
680
681#Populate
682
683#Example
684// incomplete
685##
686
687#SeeAlso incomplete
688
689#Method ##
690
691# ------------------------------------------------------------------------------
692
693#Class SkFont ##
694
695#Topic Font ##