Skip to content

Commit 5ada290

Browse files
committed
Fix FT_LOAD_TYPE_ set twice
1 parent 871e442 commit 5ada290

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kitty/freetype.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ static inline int
153153
get_load_flags(int hinting, int hintstyle, int base) {
154154
int flags = base;
155155
if (hinting) {
156-
if (hintstyle >= 3) flags |= FT_LOAD_TARGET_NORMAL;
157-
else if (0 < hintstyle && hintstyle < 3) flags |= FT_LOAD_TARGET_LIGHT;
156+
if (!(flags & (FT_LOAD_TARGET_MONO | FT_LOAD_TARGET_LCD | FT_LOAD_TARGET_LCD_V))) {
157+
if (hintstyle >= 3) flags |= FT_LOAD_TARGET_NORMAL;
158+
else if (0 < hintstyle && hintstyle < 3) flags |= FT_LOAD_TARGET_LIGHT;
159+
}
158160
} else flags |= FT_LOAD_NO_HINTING;
159161
return flags;
160162
}

0 commit comments

Comments
 (0)