• Home
  • Raw
  • Download

Lines Matching +full:6 +full:- +full:aat +full:- +full:fonts

2  * Copyright © 1998-2004  David Turner and Werner Lemberg
31 #include "hb-open-type.hh"
32 #include "hb-ot-layout.hh"
33 #include "hb-ot-face.hh"
34 #include "hb-ot-map.hh"
35 #include "hb-map.hh"
37 #include "hb-ot-kern-table.hh"
38 #include "hb-ot-gasp-table.hh" // Just so we compile it; unused otherwise.
39 #include "hb-ot-layout-gdef-table.hh"
40 #include "hb-ot-layout-gsub-table.hh"
41 #include "hb-ot-layout-gpos-table.hh"
42 #include "hb-ot-layout-base-table.hh" // Just so we compile it; unused otherwise.
43 #include "hb-ot-layout-jstf-table.hh" // Just so we compile it; unused otherwise.
44 #include "hb-ot-name-table.hh"
45 #include "hb-ot-os2-table.hh"
47 #include "hb-aat-layout-lcar-table.hh"
48 #include "hb-aat-layout-morx-table.hh"
52 * SECTION:hb-ot-layout
53 * @title: hb-ot-layout
55 * @include: hb-ot.h
68 return face->table.kern->has_data (); in hb_ot_layout_has_kerning()
74 return face->table.kern->has_state_machine (); in hb_ot_layout_has_machine_kerning()
80 return face->table.kern->has_cross_stream (); in hb_ot_layout_has_cross_kerning()
88 hb_blob_t *blob = font->face->table.kern.get_blob (); in hb_ot_layout_kern()
89 const AAT::kern& kern = *blob->as<AAT::kern> (); in hb_ot_layout_kern()
91 AAT::hb_aat_apply_context_t c (plan, font, buffer, blob); in hb_ot_layout_kern()
105 /* The ugly business of blacklisting individual fonts' tables happen here! in is_blacklisted()
107 * https://lists.freedesktop.org/archives/harfbuzz/2016-February/005489.html in is_blacklisted()
116 * Nuke the GDEF tables of to avoid unwanted width-zeroing. in is_blacklisted()
123 switch ENCODE(blob->length, in is_blacklisted()
124 face->table.GSUB->table.get_length (), in is_blacklisted()
125 face->table.GPOS->table.get_length ()) in is_blacklisted()
133 /* sha1sum:6d2d3c9ed5b7de87bc84eae0df95ee5232ecde26 Windows 7 timesbi.ttf */ in is_blacklisted()
145 /* sha1sum:6d400781948517c3c0441ba42acb309584b73033 tahomabd.ttf from Windows 8.1 */ in is_blacklisted()
171 /* sha1sum:6e80fd1c0b059bbee49272401583160dc1e6a427 himalaya.ttf from Windows 8.1 */ in is_blacklisted()
173 /* 8d9267aea9cd2c852ecfb9f12a6e834bfaeafe44 cantarell-fonts-0.0.21/otf/Cantarell-Regular.otf */ in is_blacklisted()
174 /* 983988ff7b47439ab79aeaf9a45bd4a2c5b9d371 cantarell-fonts-0.0.21/otf/Cantarell-Oblique.otf */ in is_blacklisted()
176 /* 2c0c90c6f6087ffbfea76589c93113a9cbb0e75f cantarell-fonts-0.0.21/otf/Cantarell-Bold.otf */ in is_blacklisted()
177 …/* 55461f5b853c6da88069ffcdf7f4dd3f8d7e3e6b cantarell-fonts-0.0.21/otf/Cantarell-Bold-Oblique.otf… in is_blacklisted()
179 /* d125afa82a77a6475ac0e74e7c207914af84b37a padauk-2.80/Padauk.ttf RHEL 7.2 */ in is_blacklisted()
181 /* 0f7b80437227b90a577cc078c0216160ae61b031 padauk-2.80/Padauk-Bold.ttf RHEL 7.2*/ in is_blacklisted()
183 /* d3dde9aa0a6b7f8f6a89ef1002e9aaa11b882290 padauk-2.80/Padauk.ttf Ubuntu 16.04 */ in is_blacklisted()
185 /* 5f3c98ccccae8a953be2d122c1b3a77fd805093f padauk-2.80/Padauk-Bold.ttf Ubuntu 16.04 */ in is_blacklisted()
187 /* 6c93b63b64e8b2c93f5e824e78caca555dc887c7 padauk-2.80/Padauk-book.ttf */ in is_blacklisted()
189 /* d89b1664058359b8ec82e35d3531931125991fb9 padauk-2.80/Padauk-bookbold.ttf */ in is_blacklisted()
191 /* 824cfd193aaf6234b2b4dc0cf3c6ef576c0d00ef padauk-3.0/Padauk-book.ttf */ in is_blacklisted()
193 /* 91fcc10cf15e012d27571e075b3b4dfe31754a8a padauk-3.0/Padauk-bookbold.ttf */ in is_blacklisted()
210 const OT::GDEF &gdef = *font->face->table.GDEF->table; in _hb_ot_layout_set_glyph_props()
211 unsigned int count = buffer->len; in _hb_ot_layout_set_glyph_props()
214 …_hb_glyph_info_set_glyph_props (&buffer->info[i], gdef.get_glyph_props (buffer->info[i].codepoint)… in _hb_ot_layout_set_glyph_props()
215 _hb_glyph_info_clear_lig_props (&buffer->info[i]); in _hb_ot_layout_set_glyph_props()
216 buffer->info[i].syllable() = 0; in _hb_ot_layout_set_glyph_props()
225 return face->table.GDEF->table->has_glyph_classes (); in hb_ot_layout_has_glyph_classes()
237 return (hb_ot_layout_glyph_class_t) face->table.GDEF->table->get_glyph_class (glyph); in hb_ot_layout_get_glyph_class()
250 return face->table.GDEF->table->get_glyphs_in_class (klass, glyphs); in hb_ot_layout_get_glyphs_in_class()
260 return face->table.GDEF->table->get_attach_points (glyph, in hb_ot_layout_get_attach_points()
275 …unsigned int result = font->face->table.GDEF->table->get_lig_carets (font, direction, glyph, start… in hb_ot_layout_get_ligature_carets()
281 …result = font->face->table.lcar->get_lig_carets (font, direction, glyph, start_offset, caret_count… in hb_ot_layout_get_ligature_carets()
294 /* Mac OS X prefers morx over GSUB. It also ships with various Indic fonts, in is_blacklisted()
297 * our morx/GSUB preference code. But if GSUB has non-zero scripts, we tend in is_blacklisted()
301 * To work around broken Indic Mac system fonts, we ignore GSUB table if in is_blacklisted()
308 if (unlikely (face->table.OS2->achVendID == HB_TAG ('M','U','T','F') && in is_blacklisted()
309 face->table.morx->has_data ())) in is_blacklisted()
327 case HB_OT_TAG_GSUB: return *face->table.GSUB->table; in get_gsubgpos_table()
328 case HB_OT_TAG_GPOS: return *face->table.GPOS->table; in get_gsubgpos_table()
364 /* try with 'dflt'; MS site has had typos and many fonts use it now :(. in hb_ot_layout_table_find_script()
369 /* try with 'latn'; some old fonts put their features there even though in hb_ot_layout_table_find_script()
387 …return hb_ot_layout_table_select_script (face, table_tag, t - script_tags, script_tags, script_ind… in hb_ot_layout_table_choose_script()
424 /* try with 'dflt'; MS site has had typos and many fonts use it now :( */ in hb_ot_layout_table_select_script()
431 /* try with 'latn'; some old fonts put their features there even though in hb_ot_layout_table_select_script()
718 hb_codepoint_t delta = (hb_codepoint_t) ((uintptr_t) &p - (uintptr_t) &g); in visited()
742 if (c->visited (l)) return; in langsys_collect_features()
748 c->feature_indexes->add (l.get_required_feature_index ()); in langsys_collect_features()
750 l.add_feature_indexes_to (c->feature_indexes); in langsys_collect_features()
763 if (feature_tag == c->g.get_feature_tag (feature_index)) in langsys_collect_features()
765 c->feature_indexes->add (feature_index); in langsys_collect_features()
779 if (c->visited (s)) return; in script_collect_features()
893 const OT::SubstLookup& l = face->table.GSUB->table->get_lookup (lookup_index); in hb_ot_layout_lookup_collect_glyphs()
899 const OT::PosLookup& l = face->table.GPOS->table->get_lookup (lookup_index); in hb_ot_layout_lookup_collect_glyphs()
946 return face->table.GSUB->table->has_data (); in hb_ot_layout_has_substitution()
974 if (unlikely (lookup_index >= face->table.GSUB->lookup_count)) return false; in hb_ot_layout_lookup_would_substitute_fast()
977 const OT::SubstLookup& l = face->table.GSUB->table->get_lookup (lookup_index); in hb_ot_layout_lookup_would_substitute_fast()
979 return l.would_apply (&c, &face->table.GSUB->accels[lookup_index]); in hb_ot_layout_lookup_would_substitute_fast()
994 * NOTE! We can't use out-buffer as we have positioning data. */ in hb_ot_layout_delete_glyphs_inplace()
996 unsigned int count = buffer->len; in hb_ot_layout_delete_glyphs_inplace()
997 hb_glyph_info_t *info = buffer->info; in hb_ot_layout_delete_glyphs_inplace()
998 hb_glyph_position_t *pos = buffer->pos; in hb_ot_layout_delete_glyphs_inplace()
1004 * Same logic as buffer->delete_glyph(), but for in-place removal. */ in hb_ot_layout_delete_glyphs_inplace()
1013 if (cluster < info[j - 1].cluster) in hb_ot_layout_delete_glyphs_inplace()
1016 unsigned int old_cluster = info[j - 1].cluster; in hb_ot_layout_delete_glyphs_inplace()
1017 for (unsigned k = j; k && info[k - 1].cluster == old_cluster; k--) in hb_ot_layout_delete_glyphs_inplace()
1018 buffer->set_cluster (info[k - 1], cluster, mask); in hb_ot_layout_delete_glyphs_inplace()
1024 buffer->merge_clusters (i, i + 2); /* Merge cluster forward. */ in hb_ot_layout_delete_glyphs_inplace()
1036 buffer->len = j; in hb_ot_layout_delete_glyphs_inplace()
1052 const OT::SubstLookup& l = face->table.GSUB->table->get_lookup (lookup_index); in hb_ot_layout_lookup_substitute_closure()
1072 const OT::GSUB& gsub = *face->table.GSUB->table; in hb_ot_layout_lookups_substitute_closure()
1078 glyphs_length = glyphs->get_population (); in hb_ot_layout_lookups_substitute_closure()
1090 glyphs_length != glyphs->get_population ()); in hb_ot_layout_lookups_substitute_closure()
1100 return face->table.GPOS->table->has_data (); in hb_ot_layout_has_positioning()
1134 const OT::GPOS &gpos = *face->table.GPOS->table; in hb_ot_layout_get_size_params()
1172 * @label_id: (out) (allow-none): The ‘name’ table name ID that specifies a string
1173 * for a user-interface label for this feature. (May be NULL.)
1174 * @tooltip_id: (out) (allow-none): The ‘name’ table name ID that specifies a string
1177 * @sample_id: (out) (allow-none): The ‘name’ table name ID that specifies sample text
1179 * @num_named_parameters: (out) (allow-none): Number of named parameters. (May be zero.)
1180 * @first_param_id: (out) (allow-none): The first ‘name’ table name ID used to specify
1181 * strings for user-interface labels for the feature
1252 * @char_count: (inout) (allow-none): The count of characters for which this feature
1254 …* @characters: (out caller-allocates) (array length=char_count): A buffer pointer. The Unicode cod…
1285 len = MIN (cv_params.characters.len - start_offset, *char_count); in hb_ot_layout_feature_get_characters()
1307 table (*face->table.GSUB->table), in GSUBProxy()
1308 accels (face->table.GSUB->accels) {} in GSUBProxy()
1321 table (*face->table.GPOS->table), in GPOSProxy()
1322 accels (face->table.GPOS->accels) {} in GPOSProxy()
1334 hb_buffer_t *buffer = c->buffer; in apply_forward()
1335 while (buffer->idx < buffer->len && buffer->successful) in apply_forward()
1338 if (accel.may_have (buffer->cur().codepoint) && in apply_forward()
1339 (buffer->cur().mask & c->lookup_mask) && in apply_forward()
1340 c->check_glyph_property (&buffer->cur(), c->lookup_props)) in apply_forward()
1348 buffer->next_glyph (); in apply_forward()
1358 hb_buffer_t *buffer = c->buffer; in apply_backward()
1361 if (accel.may_have (buffer->cur().codepoint) && in apply_backward()
1362 (buffer->cur().mask & c->lookup_mask) && in apply_backward()
1363 c->check_glyph_property (&buffer->cur(), c->lookup_props)) in apply_backward()
1367 buffer->idx--; in apply_backward()
1370 while ((int) buffer->idx >= 0); in apply_backward()
1380 hb_buffer_t *buffer = c->buffer; in apply_string()
1382 if (unlikely (!buffer->len || !c->lookup_mask)) in apply_string()
1385 c->set_lookup_props (lookup.get_props ()); in apply_string()
1391 buffer->clear_output (); in apply_string()
1392 buffer->idx = 0; in apply_string()
1399 buffer->swap_buffers (); in apply_string()
1401 assert (!buffer->has_separate_output ()); in apply_string()
1406 /* in-place backward substitution/positioning */ in apply_string()
1408 buffer->remove_output (); in apply_string()
1409 buffer->idx = buffer->len - 1; in apply_string()
1428 for (; i < stage->last_lookup; i++) in apply()
1431 if (!buffer->message (font, "start lookup %d", lookup_index)) continue; in apply()
1439 buffer->unsafe_to_break_all (); in apply()
1444 (void) buffer->message (font, "end lookup %d", lookup_index); in apply()
1447 if (stage->pause_func) in apply()
1449 buffer->clear_output (); in apply()
1450 stage->pause_func (plan, font, buffer); in apply()
1457 GSUBProxy proxy (font->face); in substitute()
1463 GPOSProxy proxy (font->face); in position()
1478 return *face->table.BASE;
1489 const OT::BASE &base = _get_base (font->face);
1493 …/* TODO: Simulate https://docs.microsoft.com/en-us/typography/opentype/spec/baselinetags#ideograph…
1496 if (coord) *coord = font->em_scale_dir (*coord, direction);
1509 * https://docs.microsoft.com/en-us/typography/opentype/spec/baselinetags