forked from mirrors/gecko-dev
Bug 1740526 - Let OTS validate the COLR/CPAL tables. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D157476
This commit is contained in:
parent
ac638d06e2
commit
b28fa03480
3 changed files with 26 additions and 27 deletions
|
|
@ -105,16 +105,14 @@ class MOZ_STACK_CLASS gfxOTSContext : public ots::OTSContext {
|
|||
}
|
||||
|
||||
virtual ots::TableAction GetTableAction(uint32_t aTag) override {
|
||||
// Preserve Graphite, color glyph and SVG tables,
|
||||
// Preserve Graphite and SVG tables,
|
||||
// and possibly OTL and Variation tables (depending on prefs)
|
||||
if ((!mCheckOTLTables && (aTag == TRUETYPE_TAG('G', 'D', 'E', 'F') ||
|
||||
aTag == TRUETYPE_TAG('G', 'P', 'O', 'S') ||
|
||||
aTag == TRUETYPE_TAG('G', 'S', 'U', 'B')))) {
|
||||
return ots::TABLE_ACTION_PASSTHRU;
|
||||
}
|
||||
if (aTag == TRUETYPE_TAG('S', 'V', 'G', ' ') ||
|
||||
aTag == TRUETYPE_TAG('C', 'O', 'L', 'R') ||
|
||||
aTag == TRUETYPE_TAG('C', 'P', 'A', 'L')) {
|
||||
if (aTag == TRUETYPE_TAG('S', 'V', 'G', ' ')) {
|
||||
return ots::TABLE_ACTION_PASSTHRU;
|
||||
}
|
||||
if (mKeepColorBitmaps && (aTag == TRUETYPE_TAG('C', 'B', 'D', 'T') ||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -163,37 +163,38 @@ fuzzy-if(OSX,198-198,172-172) == color-1b.html color-1-ref.html
|
|||
# COLRv1 (enhanced color font) format
|
||||
# Comparing COLRv1 glyph rendering to CSS backgrounds we can expect "fuzz" in lots of gradients
|
||||
# and along antialiased diagonals, etc., but the differences are barely perceptible to the eye.
|
||||
# These are skipped on Win7 because lack of font-variation support means the COLR table
|
||||
# in the test font CAhem.ttf will be dropped.
|
||||
defaults pref(gfx.font_rendering.colr_v1.enabled,true)
|
||||
== colrv1-01.html#A colrv1-01-ref.html#A
|
||||
== colrv1-01.html#B colrv1-01-ref.html#B
|
||||
fuzzy(0-1,0-10000) == colrv1-01.html#C colrv1-01-ref.html#C
|
||||
fuzzy(0-1,0-600) == colrv1-01.html#D colrv1-01-ref.html#D
|
||||
fuzzy(0-1,0-200) == colrv1-01.html#E colrv1-01-ref.html#E
|
||||
fuzzy(0-1,0-200) == colrv1-01.html#F colrv1-01-ref.html#F
|
||||
fuzzy(0-1,0-400) == colrv1-01.html#G colrv1-01-ref.html#G
|
||||
fuzzy(0-1,0-400) == colrv1-01.html#H colrv1-01-ref.html#H
|
||||
fuzzy(0-1,0-10000) == colrv1-01.html#I colrv1-01-ref.html#I
|
||||
fuzzy(0-1,0-576) == colrv1-01.html#J colrv1-01-ref.html#J
|
||||
fuzzy(0-1,0-748) == colrv1-01.html#K colrv1-01-ref.html#K
|
||||
fuzzy(0-1,0-851) == colrv1-01.html#L colrv1-01-ref.html#L
|
||||
fuzzy(0-1,0-668) == colrv1-01.html#M colrv1-01-ref.html#M
|
||||
fuzzy(0-1,0-848) == colrv1-01.html#N colrv1-01-ref.html#N
|
||||
fuzzy(0-1,0-675) == colrv1-01.html#O colrv1-01-ref.html#O
|
||||
== colrv1-01.html#P colrv1-01-ref.html#P
|
||||
fuzzy(0-138,0-318) == colrv1-01.html#Q colrv1-01-ref.html#Q
|
||||
fuzzy(0-214,0-158) == colrv1-01.html#R colrv1-01-ref.html#R
|
||||
fuzzy(0-255,0-156) == colrv1-01.html#S colrv1-01-ref.html#S
|
||||
fuzzy(0-237,0-277) == colrv1-01.html#T colrv1-01-ref.html#T
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == colrv1-01.html#A colrv1-01-ref.html#A
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == colrv1-01.html#B colrv1-01-ref.html#B
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-10000) == colrv1-01.html#C colrv1-01-ref.html#C
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-600) == colrv1-01.html#D colrv1-01-ref.html#D
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-200) == colrv1-01.html#E colrv1-01-ref.html#E
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-200) == colrv1-01.html#F colrv1-01-ref.html#F
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-400) == colrv1-01.html#G colrv1-01-ref.html#G
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-400) == colrv1-01.html#H colrv1-01-ref.html#H
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-10000) == colrv1-01.html#I colrv1-01-ref.html#I
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-576) == colrv1-01.html#J colrv1-01-ref.html#J
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-748) == colrv1-01.html#K colrv1-01-ref.html#K
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-851) == colrv1-01.html#L colrv1-01-ref.html#L
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-668) == colrv1-01.html#M colrv1-01-ref.html#M
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-848) == colrv1-01.html#N colrv1-01-ref.html#N
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-675) == colrv1-01.html#O colrv1-01-ref.html#O
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == colrv1-01.html#P colrv1-01-ref.html#P
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-138,0-318) == colrv1-01.html#Q colrv1-01-ref.html#Q
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-214,0-158) == colrv1-01.html#R colrv1-01-ref.html#R
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-255,0-156) == colrv1-01.html#S colrv1-01-ref.html#S
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-237,0-277) == colrv1-01.html#T colrv1-01-ref.html#T
|
||||
|
||||
# Skip tests that require font variations on Win7, as not supported by DWrite there.
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-1) == colrv1-03.html colrv1-03-ref.html
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-1,0-600) fuzzy-if(Android,0-64,0-37100) == colrv1-04.html colrv1-04-ref.html
|
||||
defaults
|
||||
|
||||
# Check that the tech(color-COLRv1) function responds to whether COLRv1 support is enabled.
|
||||
defaults pref(layout.css.font-tech.enabled,true)
|
||||
pref(gfx.font_rendering.colr_v1.enabled,true) == colrv1-02.html colrv1-02a-ref.html
|
||||
pref(gfx.font_rendering.colr_v1.enabled,false) == colrv1-02.html colrv1-02b-ref.html
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) pref(gfx.font_rendering.colr_v1.enabled,true) == colrv1-02.html colrv1-02a-ref.html
|
||||
skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) pref(gfx.font_rendering.colr_v1.enabled,false) == colrv1-02.html colrv1-02b-ref.html
|
||||
defaults
|
||||
|
||||
== woff2-1.html woff2-1-ref.html
|
||||
|
|
|
|||
Loading…
Reference in a new issue