[sdf] Return `FT_Err_Ok` while trying to render bitmap.

* src/sdf/ftsdfrend.c (ft_bsdf_render): Return OK if the slot is
  a bitmap and the render mode is anything other than `FT_RENDER_MODE_SDF`.
  This is for compatibility reasons.

  Fixes issue #1076
This commit is contained in:
Anuj Verma 2021-08-16 07:48:09 +05:30
parent fed5521016
commit d7f649f283
1 changed files with 5 additions and 2 deletions

View File

@ -502,8 +502,11 @@
/* check whether render mode is correct */
if ( mode != FT_RENDER_MODE_SDF )
{
error = FT_THROW( Cannot_Render_Glyph );
goto Exit;
FT_TRACE0(( "ft_bsdf_render: trying to render bitmap\n" ));
/* return OK since the slot is already a bitmap */
error = FT_Err_Ok;
return error;
}
if ( origin )