mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 15:31:05 +01:00
[BASE] Saturate device adjustments
Format-3 baseline coordinates add a device or variation delta to an already scaled coordinate. Saturate that addition at full-range font scales and deltas. Tested with: meson test -C build --print-errorlogs Assisted-by: OpenAI Codex
This commit is contained in:
1 parent
74d780eca5
commit
c09b799fca
1 file changed
+2
-2
@@ -109,8 +109,8 @@ struct BaseCoordFormat3
|
||||
const Device &device = this+deviceTable;
|
||||
|
||||
return HB_DIRECTION_IS_HORIZONTAL (direction)
|
||||
? font->em_scale_y (coordinate) + device.get_y_delta (font, var_store)
|
||||
: font->em_scale_x (coordinate) + device.get_x_delta (font, var_store);
|
||||
? hb_saturate_add (font->em_scale_y (coordinate), device.get_y_delta (font, var_store))
|
||||
: hb_saturate_add (font->em_scale_x (coordinate), device.get_x_delta (font, var_store));
|
||||
}
|
||||
|
||||
void collect_variation_indices (hb_set_t& varidx_set /* OUT */) const
|
||||
|
||||
Reference in new issue
Block a user