mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-07 04:08:47 +02:00
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Protect FT_LOAD_COLOR.
Now only *scalable* COLRv0 layers can be rendered with FT_LOAD_COLOR, in accordance with Chromium. Fixes #1425, also see !424.
This commit is contained in:
parent
590b77014b
commit
cbe12767ea
1 changed files with 3 additions and 2 deletions
|
|
@ -4741,7 +4741,8 @@
|
|||
|
||||
|
||||
/* try to render colored glyph layers as a special case */
|
||||
if ( slot->internal->load_flags & FT_LOAD_COLOR )
|
||||
if ( slot->internal->load_flags & FT_LOAD_COLOR &&
|
||||
slot->format == FT_GLYPH_FORMAT_OUTLINE )
|
||||
{
|
||||
FT_LayerIterator iterator;
|
||||
|
||||
|
|
@ -4777,7 +4778,7 @@
|
|||
load_flags &= ~FT_LOAD_COLOR;
|
||||
|
||||
/* render into the new `face->glyph' glyph slot */
|
||||
load_flags |= FT_LOAD_RENDER;
|
||||
load_flags |= FT_LOAD_RENDER | FT_LOAD_NO_BITMAP;
|
||||
|
||||
error = FT_Load_Glyph( face, glyph_index, load_flags );
|
||||
if ( error )
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue