/external/skia/modules/canvaskit/ |
D | font.js | 16 CanvasKit.Canvas.prototype.drawGlyphs = function(glyphs, positions, x, y, font, paint) { argument 17 if (!(glyphs.length*2 <= positions.length)) { 21 const glyphs_ptr = copy1dArray(glyphs, 'HEAPU16'); 24 this._drawGlyphs(glyphs.length, glyphs_ptr, positions_ptr, x, y, font, paint); 27 freeArraysThatAreNotMallocedByUsers(glyphs_ptr, glyphs); 34 CanvasKit.Font.prototype.getGlyphBounds = function(glyphs, paint, optionalOutputArray) { argument 35 var glyphPtr = copy1dArray(glyphs, 'HEAPU16'); 37 var rectPtr = CanvasKit._malloc(glyphs.length * bytesPerRect); 38 this._getGlyphWidthBounds(glyphPtr, glyphs.length, nullptr, rectPtr, paint || null); 40 var rects = new Float32Array(CanvasKit.HEAPU8.buffer, rectPtr, glyphs.length * 4); [all …]
|
/external/skia/src/pdf/ |
D | SkPDFMakeCIDGlyphWidthsArray.cpp | 114 auto glyphs = paths.glyphs(SkSpan(glyphIDs)); in SkPDFMakeCIDGlyphWidthsArray() local 118 advances.reserve_back(glyphs.size()); in SkPDFMakeCIDGlyphWidthsArray() 119 for (const SkGlyph* glyph : glyphs) { in SkPDFMakeCIDGlyphWidthsArray() 129 for (size_t i = 0; i < glyphs.size(); ++i) { in SkPDFMakeCIDGlyphWidthsArray() 130 int16_t advance = (int16_t)glyphs[i]->advanceX(); in SkPDFMakeCIDGlyphWidthsArray() 142 for (; j < glyphs.size(); ++j) { in SkPDFMakeCIDGlyphWidthsArray() 143 int16_t next_advance = (int16_t)glyphs[j]->advanceX(); in SkPDFMakeCIDGlyphWidthsArray() 149 result->appendInt(glyphs[i]->getGlyphID()); in SkPDFMakeCIDGlyphWidthsArray() 150 result->appendInt(glyphs[j - 1]->getGlyphID()); in SkPDFMakeCIDGlyphWidthsArray() 158 result->appendInt(glyphs[i]->getGlyphID()); in SkPDFMakeCIDGlyphWidthsArray() [all …]
|
/external/harfbuzz_ng/src/OT/Layout/Common/ |
D | Coverage.hh | 111 bool serialize (hb_serialize_context_t *c, Iterator glyphs) in serialize() 119 for (auto g: glyphs) in serialize() 135 case 1: return_trace (u.format1.serialize (c, glyphs)); in serialize() 136 case 2: return_trace (u.format2.serialize (c, glyphs)); in serialize() 138 case 3: return_trace (u.format3.serialize (c, glyphs)); in serialize() 139 case 4: return_trace (u.format4.serialize (c, glyphs)); in serialize() 156 hb_sorted_vector_t<hb_codepoint_t> glyphs (it); in subset() local 157 Coverage_serialize (c->serializer, glyphs.iter ()); in subset() 158 return_trace (bool (glyphs)); in subset() 161 bool intersects (const hb_set_t *glyphs) const in intersects() [all …]
|
D | CoverageFormat1.hh | 72 bool serialize (hb_serialize_context_t *c, Iterator glyphs) in serialize() 75 return_trace (glyphArray.serialize (c, glyphs)); in serialize() 78 bool intersects (const hb_set_t *glyphs) const in intersects() 80 if (glyphArray.len > glyphs->get_population () * hb_bit_storage ((unsigned) glyphArray.len) / 2) in intersects() 82 for (hb_codepoint_t g = HB_SET_VALUE_INVALID; glyphs->next (&g);) in intersects() 89 if (glyphs->has (g)) in intersects() 93 bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const in intersects_coverage() 94 { return glyphs->has (glyphArray[index]); } in intersects_coverage() 98 void intersect_set (const hb_set_t &glyphs, IterableOut&& intersect_glyphs) const in intersect_set() 102 if (glyphs.has (glyphArray[i])) in intersect_set() [all …]
|
D | CoverageFormat2.hh | 78 bool serialize (hb_serialize_context_t *c, Iterator glyphs) in serialize() 85 for (auto g: glyphs) in serialize() 98 for (auto g: glyphs) in serialize() 114 bool intersects (const hb_set_t *glyphs) const in intersects() 116 … if (rangeRecord.len > glyphs->get_population () * hb_bit_storage ((unsigned) rangeRecord.len) / 2) in intersects() 118 for (hb_codepoint_t g = HB_SET_VALUE_INVALID; glyphs->next (&g);) in intersects() 125 … | hb_map ([glyphs] (const RangeRecord<Types> &range) { return range.intersects (*glyphs); })); in intersects() 127 bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const in intersects_coverage() 131 return range->intersects (*glyphs); in intersects_coverage() 137 void intersect_set (const hb_set_t &glyphs, IterableOut&& intersect_glyphs) const in intersect_set() [all …]
|
/external/fonttools/Lib/fontTools/subset/ |
D | __init__.py | 445 def _log_glyphs(self, glyphs, font=None): argument 446 self.info("Glyph names: %s", sorted(glyphs)) 449 self.info("Glyph IDs: %s", sorted(reverseGlyphMap[g] for g in glyphs)) 452 log.glyphs = MethodType(_log_glyphs, log) 459 def _dict_subset(d, glyphs): argument 460 return {g:d[g] for g in glyphs} 467 def intersect(self, glyphs): argument 469 return [i for i,g in enumerate(self.glyphs) if g in glyphs] 472 def intersect_glyphs(self, glyphs): argument 474 return set(g for g in self.glyphs if g in glyphs) [all …]
|
/external/fonttools/Lib/fontTools/feaLib/ |
D | ast.py | 232 def __init__(self, glyphs=None, location=None): argument 235 self.glyphs = glyphs if glyphs is not None else [] 241 return tuple(self.glyphs) 245 if self.curr < len(self.glyphs): 246 self.original.extend(self.glyphs[self.curr :]) 247 self.curr = len(self.glyphs) 250 return "[" + " ".join(map(asFea, self.glyphs)) + "]" 252 def extend(self, glyphs): argument 254 self.glyphs.extend(glyphs) 258 self.glyphs.append(glyph) [all …]
|
/external/skia/src/core/ |
D | SkFont.cpp | 152 void SkFont::unicharsToGlyphs(const SkUnichar uni[], int count, SkGlyphID glyphs[]) const { in unicharsToGlyphs() 153 this->getTypefaceOrDefault()->unicharsToGlyphs(uni, count, glyphs); in unicharsToGlyphs() 157 SkGlyphID glyphs[], int maxGlyphCount) const { in textToGlyphs() argument 159 glyphs, maxGlyphCount); in textToGlyphs() 173 const SkGlyphID* glyphIDs = atg.glyphs(); in measureText() 177 SkSpan<const SkGlyph*> glyphs = metrics.glyphs(SkSpan(glyphIDs, glyphCount)); in measureText() local 181 *bounds = glyphs[0]->rect(); in measureText() 182 width = glyphs[0]->advanceX(); in measureText() 184 SkRect r = glyphs[i]->rect(); in measureText() 187 width += glyphs[i]->advanceX(); in measureText() [all …]
|
/external/wayland/cursor/ |
D | convert_font.c | 58 struct glyph *glyphs; member 137 extracted_font.glyphs = calloc(count, sizeof(struct glyph)); in handle_compressed_metrics() 141 struct glyph *glyph = &extracted_font.glyphs[i]; in handle_compressed_metrics() 196 extracted_font.glyphs[i].name = calloc(1, end - start + 1); in handle_glyph_names() 197 memcpy(extracted_font.glyphs[i].name, name, end - start); in handle_glyph_names() 223 struct glyph *glyph = &extracted_font.glyphs[i]; in handle_bitmaps() 370 write_output_file(struct reconstructed_glyph *glyphs, int n) in write_output_file() argument 382 data = data_buffer.data + glyphs[i].offset; in write_output_file() 383 size = glyphs[i].width * glyphs[i].height; in write_output_file() 403 glyphs[i].name, in write_output_file() [all …]
|
/external/skia/gm/ |
D | texteffects.cpp | 57 AutoTArray<SkGlyphID> glyphs(glyphCount); in MakeFancyBlob() local 58 font.textToGlyphs(text, textLen, SkTextEncoding::kUTF8, glyphs.get(), glyphCount); in MakeFancyBlob() 60 font.getWidths(glyphs.get(), glyphCount, widths.get()); in MakeFancyBlob() 72 memcpy(buf.glyphs, glyphs.get(), SkTo<uint32_t>(defaultRunLen) * sizeof(SkGlyphID)); in MakeFancyBlob() 85 memcpy(buf.glyphs, glyphs.get() + glyphIndex, in MakeFancyBlob() 97 memcpy(buf.glyphs, glyphs.get() + glyphIndex, in MakeFancyBlob() 153 static sk_sp<SkTextBlob> make_text(const SkFont& font, const SkGlyphID glyphs[], int count) { in make_text() argument 154 return SkTextBlob::MakeFromText(glyphs, count * sizeof(SkGlyphID), font, in make_text() 158 static sk_sp<SkTextBlob> make_posh(const SkFont& font, const SkGlyphID glyphs[], int count, in make_posh() argument 161 font.getXPos(glyphs, count, xpos.get()); in make_posh() [all …]
|
/external/harfbuzz_ng/test/api/ |
D | test-buffer.c | 185 hb_glyph_info_t *glyphs; in test_buffer_contents() local 194 glyphs = hb_buffer_get_glyph_infos (b, &len2); in test_buffer_contents() 199 g_assert_cmphex (glyphs[i].mask, ==, 0); in test_buffer_contents() 200 g_assert_cmphex (glyphs[i].var1.u32, ==, 0); in test_buffer_contents() 201 g_assert_cmphex (glyphs[i].var2.u32, ==, 0); in test_buffer_contents() 213 g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]); in test_buffer_contents() 214 g_assert_cmphex (glyphs[i].cluster, ==, cluster); in test_buffer_contents() 221 g_assert_cmphex (glyphs[i].codepoint, ==, utf32[len-i]); in test_buffer_contents() 225 g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]); in test_buffer_contents() 232 g_assert_cmphex (glyphs[i].codepoint, ==, utf32[len-i]); in test_buffer_contents() [all …]
|
/external/skia/include/core/ |
D | SkFont.h | 301 SkGlyphID glyphs[], int maxGlyphCount) const; 312 void unicharsToGlyphs(const SkUnichar uni[], int count, SkGlyphID glyphs[]) const; 367 void getWidths(const SkGlyphID glyphs[], int count, SkScalar widths[], SkRect bounds[]) const { in getWidths() argument 368 this->getWidthsBounds(glyphs, count, widths, bounds, nullptr); in getWidths() 372 void getWidths(const SkGlyphID glyphs[], int count, SkScalar widths[], std::nullptr_t) const { in getWidths() argument 373 this->getWidths(glyphs, count, widths); in getWidths() 385 void getWidths(const SkGlyphID glyphs[], int count, SkScalar widths[]) const { in getWidths() argument 386 this->getWidthsBounds(glyphs, count, widths, nullptr, nullptr); in getWidths() 400 void getWidthsBounds(const SkGlyphID glyphs[], int count, SkScalar widths[], SkRect bounds[], 413 void getBounds(const SkGlyphID glyphs[], int count, SkRect bounds[], in getBounds() argument [all …]
|
/external/skia/src/text/gpu/ |
D | GlyphVector.cpp | 24 GlyphVector::GlyphVector(SkStrikePromise&& strikePromise, SkSpan<Variant> glyphs) in GlyphVector() argument 26 , fGlyphs{glyphs} { 31 GlyphVector::MakeGlyphs(SkSpan<SkPackedGlyphID> glyphs, sktext::gpu::SubRunAllocator* alloc) { in MakeGlyphs() argument 32 Variant* variants = alloc->makePODArray<Variant>(glyphs.size()); in MakeGlyphs() 33 for (auto [i, gv] : SkMakeEnumerate(glyphs)) { in MakeGlyphs() 40 SkStrikePromise&& promise, SkSpan<SkPackedGlyphID> glyphs, SubRunAllocator* alloc) { in Make() argument 41 SkASSERT(glyphs.size() > 0); in Make() 42 Variant* variants = MakeGlyphs(glyphs, alloc); in Make() 43 return GlyphVector{std::move(promise), SkSpan(variants, glyphs.size())}; in Make() 92 SkSpan<const Glyph*> GlyphVector::glyphs() const { in glyphs() function in sktext::gpu::GlyphVector
|
/external/harfbuzz_ng/util/ |
D | hb-ot-shape-closure.cc | 57 glyphs = hb_set_create (); in init() 70 hb_set_clear (glyphs); in consume_line() 71 shaper.shape_closure (text, text_len, font, buffer, glyphs); in consume_line() 73 if (hb_set_is_empty (glyphs)) in consume_line() 78 for (hb_codepoint_t i = -1; hb_set_next (glyphs, &i);) in consume_line() 100 hb_set_destroy (glyphs); in finish() 101 glyphs = nullptr; in finish() 112 hb_set_t *glyphs = nullptr; member
|
/external/harfbuzz_ng/src/OT/Layout/GSUB/ |
D | SingleSubst.hh | 47 Iterator glyphs) in serialize() 53 if (glyphs) in serialize() 59 if (+ glyphs in serialize() 70 delta = get_delta (*glyphs); in serialize() 71 if (!hb_all (++(+glyphs), delta, get_delta)) format += 1; in serialize() 77 + glyphs in serialize() 80 case 2: return_trace (u.format2.serialize (c, glyphs)); in serialize() 83 + glyphs in serialize() 86 case 4: return_trace (u.format4.serialize (c, glyphs)); in serialize()
|
/external/skia/docs/examples/ |
D | Canvas_drawTextBlob.cpp | 11 uint16_t glyphs[len]; 13 paint.textToGlyphs(bunny, len, glyphs); 23 memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen); 25 textPos.fX += paint.measureText(&glyphs[glyphIndex], sizeof(glyphs[0]) * runLen, nullptr);
|
D | TextBlob_bounds.cpp | 11 uint16_t glyphs[len]; 13 paint.textToGlyphs(bunny, len, glyphs); 24 memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen); 25 textPos.fX += paint.measureText(&glyphs[glyphIndex], sizeof(glyphs[0]) * runLen, nullptr);
|
D | TextBlob_uniqueID.cpp | 12 uint16_t glyphs[len]; 14 paint.textToGlyphs(bunny, len, glyphs); 27 memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen); 28 … textPos.fX += paint.measureText(&glyphs[glyphIndex], sizeof(glyphs[0]) * runLen, nullptr);
|
/external/skia/site/docs/dev/design/ |
D | text_c2d.md | 8 and draw the text as positioned glyphs. This processing step is needed whenever text is measured or 13 This proposal extends Canvas2D to allow it to draw those glyphs directly, and also includes utiliti… 14 querying attributes of the glyphs (not needed for drawing, but useful for other operations). 17 * Drawing positioned glyphs should be at least as flexible as the existing fillText() method. 18 * It is expected that drawing glyphs can be faster than fillText() -- no shaping/processing is need… 21 ## Drawing glyphs 26 context.fillGlyphs(glyphs, positions, Font); 28 context.strokeGlyphs(glyphs, positions, Font); 39 results are represented in the glyphs, positions, and [Font](/docs/dev/design/text_shaper) paramete… 54 clients may want to query information about specific glyphs within that Font. Those extended method… [all …]
|
/external/fonttools/Tests/otlLib/ |
D | optimize_test.py | 17 glyphs = ".notdef space A Aacute B D".split() 26 fb.setupGlyphOrder(glyphs) 107 glyphs: List[str] = [] 111 glyphs.extend(f"g_{script}_{i}" for i in range(max(width, height))) 116 classes = "\n".join([f"@{g} = [{g}];" for g in glyphs]) 124 return glyphs, features 159 glyphs, features = get_kerning_by_blocks(blocks) 160 glyphs = [".notdef space"] + glyphs 165 fb.setupGlyphOrder(glyphs)
|
/external/fonttools/Tests/cu2qu/ |
D | ufo_test.py | 108 glyphs = [f[glyph] for f in fonts] 109 assert glyphs_to_quadratic(glyphs) == expected 117 glyphs = [f['a'] for f in fonts] 119 glyphs_to_quadratic(glyphs, max_err=4.096, stats=stats) 123 glyphs = [f['a'] for f in fonts] 125 glyphs_to_quadratic(glyphs, max_err=[4.096, 4.096], stats=stats) 129 glyphs = [f['A'] for f in fonts] 130 assert glyphs_to_quadratic(glyphs, reverse_direction=True) 180 glyphs = [] 186 glyphs.append(glyph) [all …]
|
/external/skia/tests/ |
D | GrSlugTest.cpp | 46 SkTDArray<uint16_t> glyphs; in DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS() local 47 glyphs.append(glyphCount); in DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS() 48 font.textToGlyphs(kText, txtLen, SkTextEncoding::kUTF8, glyphs.begin(), glyphCount); in DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS() 57 const SkTextBlobBuilder::RunBuffer& buf = builder.allocRun(font, glyphs.size(), 0, 0); in DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS() 58 memcpy(buf.glyphs, glyphs.begin(), glyphs.size() * sizeof(uint16_t)); in DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS()
|
/external/fonttools/Lib/fontTools/cu2qu/ |
D | errors.py | 31 def __init__(self, glyphs): argument 32 assert len(glyphs) > 1 33 self.glyphs = glyphs 34 names = set(repr(g.name) for g in glyphs) 52 def __init__(self, glyphs, segments): argument 53 IncompatibleGlyphsError.__init__(self, glyphs)
|
/external/fonttools/Lib/fontTools/otlLib/ |
D | builder.py | 27 def buildCoverage(glyphs, glyphMap): argument 55 if not glyphs: 58 self.glyphs = sorted(set(glyphs), key=glyphMap.__getitem__) 186 def setInputCoverage_(self, glyphs, subtable): argument 187 subtable.InputGlyphCount = len(glyphs) 189 for g in glyphs: 193 def setCoverage_(self, glyphs, subtable): argument 194 subtable.GlyphCount = len(glyphs) 196 for g in glyphs: 303 for coverage in (rule.prefix, rule.glyphs, rule.suffix): [all …]
|
/external/fonttools/Tests/ttLib/tables/ |
D | _m_o_r_t_test.py | 93 glyphs = ['.notdef'] + ['g.%d' % i for i in range (1, 140)] 94 glyphs[11], glyphs[13] = 'parenleft', 'parenright' 95 glyphs[135], glyphs[136] = 'parenleft.vertical', 'parenright.vertical' 96 cls.font = FakeFont(glyphs)
|