mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 16:01:07 +01:00
[font] Widen scale multiplier setup
Building the fixed-point font multipliers negated INT_MIN and shifted negative values. Replace both paths with a widened multiplication, which is defined across the full font-scale range. Tested with: meson test -C build --print-errorlogs Assisted-by: OpenAI Codex
This commit is contained in:
1 parent
30f199d108
commit
91bcdb6653
1 file changed
+2
-4
+2
-4
@@ -1168,10 +1168,8 @@ struct hb_font_t
|
||||
|
||||
x_multf = x_scale / upem;
|
||||
y_multf = y_scale / upem;
|
||||
bool x_neg = x_scale < 0;
|
||||
x_mult = (x_neg ? -((int64_t) -x_scale << 16) : ((int64_t) x_scale << 16)) / upem;
|
||||
bool y_neg = y_scale < 0;
|
||||
y_mult = (y_neg ? -((int64_t) -y_scale << 16) : ((int64_t) y_scale << 16)) / upem;
|
||||
x_mult = (int64_t) x_scale * 0x10000 / upem;
|
||||
y_mult = (int64_t) y_scale * 0x10000 / upem;
|
||||
|
||||
is_synthetic = x_embolden || y_embolden || slant;
|
||||
|
||||
|
||||
Reference in new issue
Block a user