summaryrefslogtreecommitdiffstats
path: root/libass/ass_font.c
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2023-01-22 03:40:42 +0200
committerOleg Oshmyan <chortos@inbox.lv>2023-01-22 03:41:04 +0200
commit9995c9741d3faf66a82f8ca90668ef681cf7b022 (patch)
tree8a4fdabd0eda59c3dfb6268265937189e421b6f7 /libass/ass_font.c
parente57f700ec2dd9655fb8fd27d40b2be7a4b4821cf (diff)
downloadlibass-9995c9741d3faf66a82f8ca90668ef681cf7b022.tar.bz2
libass-9995c9741d3faf66a82f8ca90668ef681cf7b022.tar.xz
Drop unnecessary os2->version != 0xffff check
This kind of check is used internally in FreeType to distinguish a real OS/2 table from a placeholder that is always present in every FT_Face. However, the public FT_Get_Sfnt_Table API already performs this check and returns NULL if a real table is absent: we do not need to recheck this, and indeed we do not do this anywhere else.
Diffstat (limited to 'libass/ass_font.c')
-rw-r--r--libass/ass_font.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_font.c b/libass/ass_font.c
index 7b463ce..d875e1b 100644
--- a/libass/ass_font.c
+++ b/libass/ass_font.c
@@ -504,7 +504,7 @@ void ass_face_set_size(FT_Face face, double size)
int ass_face_get_weight(FT_Face face)
{
TT_OS2 *os2 = FT_Get_Sfnt_Table(face, FT_SFNT_OS2);
- if (os2 && os2->version != 0xffff && os2->usWeightClass)
+ if (os2 && os2->usWeightClass)
return os2->usWeightClass;
else
return 300 * !!(face->style_flags & FT_STYLE_FLAG_BOLD) + 400;