blob: 484bf93c4146b2d573c752eadfb60284d702837a [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
Cary Clarkcb6bef02018-11-29 12:05:25 -050060#Method SkFont()
61#In Constructor
62#Line # incomplete ##
63
64#Populate
65
66#Example
67// incomplete
68##
69
70#SeeAlso incomplete
71
72#Method ##
73
74# ------------------------------------------------------------------------------
75
76#Method SkFont(sk_sp<SkTypeface> typeface, SkScalar size)
77#In Constructor
78#Line # incomplete ##
79
80#Populate
81
82#Example
83// incomplete
84##
85
86#SeeAlso incomplete
87
88#Method ##
89
90# ------------------------------------------------------------------------------
91
92#Method SkFont(sk_sp<SkTypeface> typeface, SkScalar size, SkScalar scaleX, SkScalar skewX)
93#In Constructor
94#Line # incomplete ##
95
96#Populate
97
98#Example
99// incomplete
100##
101
102#SeeAlso incomplete
103
104#Method ##
105
106# ------------------------------------------------------------------------------
107
Mike Reed42af4922018-11-30 08:54:46 -0500108#Method bool operator==(const SkFont& font) const
109#In Operator
110#Line # compares fonts for equality ##
111
112#Populate
113
114#Example
115// incomplete
116##
117
118#SeeAlso incomplete
119
120#Method ##
Cary Clarkcb6bef02018-11-29 12:05:25 -0500121
122# ------------------------------------------------------------------------------
123
124#Method bool isForceAutoHinting() const
125#In incomplete
126#Line # incomplete ##
127
128#Populate
129
130#Example
131// incomplete
132##
133
134#SeeAlso incomplete
135
136#Method ##
137
138# ------------------------------------------------------------------------------
139
140#Method bool isEmbeddedBitmaps() const
141#In incomplete
142#Line # incomplete ##
143
144#Populate
145
146#Example
147// incomplete
148##
149
150#SeeAlso incomplete
151
152#Method ##
153
154# ------------------------------------------------------------------------------
155
156#Method bool isSubpixel() const
157#In incomplete
158#Line # incomplete ##
159
160#Populate
161
162#Example
163// incomplete
164##
165
166#SeeAlso incomplete
167
168#Method ##
169
170# ------------------------------------------------------------------------------
171
172#Method bool isLinearMetrics() const
173#In incomplete
174#Line # incomplete ##
175
176#Populate
177
178#Example
179// incomplete
180##
181
182#SeeAlso incomplete
183
184#Method ##
185
186# ------------------------------------------------------------------------------
187
188#Method bool isEmbolden() const
189#In incomplete
190#Line # incomplete ##
191
192#Populate
193
194#Example
195// incomplete
196##
197
198#SeeAlso incomplete
199
200#Method ##
201
202# ------------------------------------------------------------------------------
203
204#Method void setForceAutoHinting(bool forceAutoHinting)
205#In incomplete
206#Line # incomplete ##
207
208#Populate
209
210#Example
211// incomplete
212##
213
214#SeeAlso incomplete
215
216#Method ##
217
218# ------------------------------------------------------------------------------
219
220#Method void setEmbeddedBitmaps(bool embeddedBitmaps)
221#In incomplete
222#Line # incomplete ##
223
224#Populate
225
226#Example
227// incomplete
228##
229
230#SeeAlso incomplete
231
232#Method ##
233
234# ------------------------------------------------------------------------------
235
236#Method void setSubpixel(bool subpixel)
237#In incomplete
238#Line # incomplete ##
239
240#Populate
241
242#Example
243// incomplete
244##
245
246#SeeAlso incomplete
247
248#Method ##
249
250# ------------------------------------------------------------------------------
251
252#Method void setLinearMetrics(bool linearMetrics)
253#In incomplete
254#Line # incomplete ##
255
256#Populate
257
258#Example
259// incomplete
260##
261
262#SeeAlso incomplete
263
264#Method ##
265
266# ------------------------------------------------------------------------------
267
268#Method void setEmbolden(bool embolden)
269#In incomplete
270#Line # incomplete ##
271
272#Populate
273
274#Example
275// incomplete
276##
277
278#SeeAlso incomplete
279
280#Method ##
281
282# ------------------------------------------------------------------------------
283
284#Method Edging getEdging() const
285#In incomplete
286#Line # incomplete ##
287
288#Populate
289
290#Example
291// incomplete
292##
293
294#SeeAlso incomplete
295
296#Method ##
297
298# ------------------------------------------------------------------------------
299
300#Method void setEdging(Edging edging)
301#In incomplete
302#Line # incomplete ##
303
304#Populate
305
306#Example
307// incomplete
308##
309
310#SeeAlso incomplete
311
312#Method ##
313
314# ------------------------------------------------------------------------------
315
316#Method void setHinting(SkFontHinting hintingLevel)
317#In incomplete
318#Line # incomplete ##
319
320#Populate
321
322#Example
323// incomplete
324##
325
326#SeeAlso incomplete
327
328#Method ##
329
330# ------------------------------------------------------------------------------
331
332#Method SkFontHinting getHinting() const
333#In incomplete
334#Line # incomplete ##
335
336#Populate
337
338#Example
339// incomplete
340##
341
342#SeeAlso incomplete
343
344#Method ##
345
346# ------------------------------------------------------------------------------
347
348#Method SkFont makeWithSize(SkScalar size) const
349#In incomplete
350#Line # incomplete ##
351
352#Populate
353
354#Example
355// incomplete
356##
357
358#SeeAlso incomplete
359
360#Method ##
361
362# ------------------------------------------------------------------------------
363
364#Method SkTypeface* getTypeface() const
365#In incomplete
366#Line # incomplete ##
367
368#Populate
369
370#Example
371// incomplete
372##
373
374#SeeAlso incomplete
375
376#Method ##
377
378# ------------------------------------------------------------------------------
379
380#Method SkScalar getSize() const
381#In incomplete
382#Line # incomplete ##
383
384#Populate
385
386#Example
387// incomplete
388##
389
390#SeeAlso incomplete
391
392#Method ##
393
394# ------------------------------------------------------------------------------
395
396#Method SkScalar getScaleX() const
397#In incomplete
398#Line # incomplete ##
399
400#Populate
401
402#Example
403// incomplete
404##
405
406#SeeAlso incomplete
407
408#Method ##
409
410# ------------------------------------------------------------------------------
411
412#Method SkScalar getSkewX() const
413#In incomplete
414#Line # incomplete ##
415
416#Populate
417
418#Example
419// incomplete
420##
421
422#SeeAlso incomplete
423
424#Method ##
425
426# ------------------------------------------------------------------------------
427
428#Method sk_sp<SkTypeface> refTypeface() const
429#In incomplete
430#Line # incomplete ##
431
432#Populate
433
434#Example
435// incomplete
436##
437
438#SeeAlso incomplete
439
440#Method ##
441
442# ------------------------------------------------------------------------------
443
444#Method void setTypeface(sk_sp<SkTypeface> tf)
445#In incomplete
446#Line # incomplete ##
447
448#Populate
449
450#Example
451// incomplete
452##
453
454#SeeAlso incomplete
455
456#Method ##
457
458# ------------------------------------------------------------------------------
459
460#Method void setSize(SkScalar textSize)
461#In incomplete
462#Line # incomplete ##
463
464#Populate
465
466#Example
467// incomplete
468##
469
470#SeeAlso incomplete
471
472#Method ##
473
474# ------------------------------------------------------------------------------
475
476#Method void setScaleX(SkScalar scaleX)
477#In incomplete
478#Line # incomplete ##
479
480#Populate
481
482#Example
483// incomplete
484##
485
486#SeeAlso incomplete
487
488#Method ##
489
490# ------------------------------------------------------------------------------
491
492#Method void setSkewX(SkScalar skewX)
493#In incomplete
494#Line # incomplete ##
495
496#Populate
497
498#Example
499// incomplete
500##
501
502#SeeAlso incomplete
503
504#Method ##
505
506# ------------------------------------------------------------------------------
507
508#Method int textToGlyphs(const void* text, size_t byteLength, SkTextEncoding encoding,
509 SkGlyphID glyphs[], int maxGlyphCount) const
510#In incomplete
511#Line # incomplete ##
512
513#Populate
514
515#Example
516// incomplete
517##
518
519#SeeAlso incomplete
520
521#Method ##
522
523# ------------------------------------------------------------------------------
524
525#Method uint16_t unicharToGlyph(SkUnichar uni) const
526#In incomplete
527#Line # incomplete ##
528
529#Populate
530
531#Example
532// incomplete
533##
534
535#SeeAlso incomplete
536
537#Method ##
538
539# ------------------------------------------------------------------------------
540
541#Method int countText(const void* text, size_t byteLength, SkTextEncoding encoding) const
542#In incomplete
543#Line # incomplete ##
544
545#Populate
546
547#Example
548// incomplete
549##
550
551#SeeAlso incomplete
552
553#Method ##
554
555# ------------------------------------------------------------------------------
556
Mike Reed42af4922018-11-30 08:54:46 -0500557#Method bool containsText(const void* text, size_t byteLength, SkTextEncoding encoding) const
558#In incomplete
559#Line # incomplete ##
560
561#Populate
562
563#Example
Cary Clarkcb6bef02018-11-29 12:05:25 -0500564// incomplete
Mike Reed42af4922018-11-30 08:54:46 -0500565##
566
567#SeeAlso incomplete
568
569#Method ##
Cary Clarkcb6bef02018-11-29 12:05:25 -0500570
571# ------------------------------------------------------------------------------
572
573#Method SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding encoding,
574 SkRect* bounds = nullptr) const
575#In incomplete
576#Line # incomplete ##
577
578#Populate
579
580#Example
581// incomplete
582##
583
584#SeeAlso incomplete
585
586#Method ##
587
588# ------------------------------------------------------------------------------
589
590#Method bool getPath(uint16_t glyphID, SkPath* path) const
591#In incomplete
592#Line # incomplete ##
593
594#Populate
595
596#Example
597// incomplete
598##
599
600#SeeAlso incomplete
601
602#Method ##
603
604# ------------------------------------------------------------------------------
605
606#Method void getPaths(const uint16_t glyphIDs[], int count,
607 void (*glyphPathProc)(const SkPath* pathOrNull, const SkMatrix& mx, void* ctx),
608 void* ctx) const
609#In incomplete
610#Line # incomplete ##
611
612#Populate
613
614#Example
615// incomplete
616##
617
618#SeeAlso incomplete
619
620#Method ##
621
622# ------------------------------------------------------------------------------
623
624#Method SkScalar getMetrics(SkFontMetrics* metrics) const
625#In incomplete
626#Line # incomplete ##
627
628#Populate
629
630#Example
631// incomplete
632##
633
634#SeeAlso incomplete
635
636#Method ##
637
638# ------------------------------------------------------------------------------
639
640#Method SkScalar getSpacing() const
641#In incomplete
642#Line # incomplete ##
643
644#Populate
645
646#Example
647// incomplete
648##
649
650#SeeAlso incomplete
651
652#Method ##
653
654# ------------------------------------------------------------------------------
655
656#Class SkFont ##
657
658#Topic Font ##