[color] Rename get_strike() to choose_strike()

This commit is contained in:
Behdad Esfahbod 2018-10-28 23:04:37 -07:00
parent 0aa90271fd
commit 574579d376
2 changed files with 9 additions and 9 deletions

View File

@ -343,8 +343,8 @@ struct CBLC
} }
protected: protected:
const BitmapSizeTable &get_strike (hb_font_t *font, const BitmapSizeTable &choose_strike (hb_font_t *font,
unsigned int *x_ppem, unsigned int *y_ppem) const unsigned int *x_ppem, unsigned int *y_ppem) const
{ {
/* TODO: Make it possible to select strike. */ /* TODO: Make it possible to select strike. */
@ -405,7 +405,7 @@ struct CBDT
unsigned int x_ppem, y_ppem; unsigned int x_ppem, y_ppem;
const void *base; const void *base;
const BitmapSizeTable &strike = this->cblc->get_strike (font, &x_ppem, &y_ppem); const BitmapSizeTable &strike = this->cblc->choose_strike (font, &x_ppem, &y_ppem);
const IndexSubtableRecord *subtable_record = strike.find_table (glyph, cblc, &base); const IndexSubtableRecord *subtable_record = strike.find_table (glyph, cblc, &base);
if (!subtable_record || !x_ppem || !y_ppem) if (!subtable_record || !x_ppem || !y_ppem)
return false; return false;
@ -457,7 +457,7 @@ struct CBDT
unsigned int x_ppem, y_ppem; unsigned int x_ppem, y_ppem;
const void *base; const void *base;
const BitmapSizeTable &strike = this->cblc->get_strike (font, &x_ppem, &y_ppem); const BitmapSizeTable &strike = this->cblc->choose_strike (font, &x_ppem, &y_ppem);
const IndexSubtableRecord *subtable_record = strike.find_table (glyph, cblc, &base); const IndexSubtableRecord *subtable_record = strike.find_table (glyph, cblc, &base);
if (!subtable_record || !x_ppem || !y_ppem) if (!subtable_record || !x_ppem || !y_ppem)
return hb_blob_get_empty (); return hb_blob_get_empty ();

View File

@ -172,15 +172,15 @@ struct sbix
int *y_offset, int *y_offset,
unsigned int *available_ppem) const unsigned int *available_ppem) const
{ {
return get_strike (font).get_glyph_blob (glyph_id, sbix_blob, return choose_strike (font).get_glyph_blob (glyph_id, sbix_blob,
HB_TAG ('p','n','g',' '), HB_TAG ('p','n','g',' '),
x_offset, y_offset, x_offset, y_offset,
num_glyphs, available_ppem); num_glyphs, available_ppem);
} }
private: private:
inline const SBIXStrike &get_strike (hb_font_t *font) const inline const SBIXStrike &choose_strike (hb_font_t *font) const
{ {
if (unlikely (!table->strikes.len)) if (unlikely (!table->strikes.len))
return Null(SBIXStrike); return Null(SBIXStrike);