Files
oak-gpui/crates
Piotr Osiewicz 4fb9f41e69 gpui/metal: Clamp max texture width/height to 16kB (#10314)
Fixed #10149
A user had Zed crash due to invalid font size in settings. It turned out
the width/height of glyphs does not pass validation in Metal texture
initialization with a large enough font size.

All modern Macs have a max texture width/height of 16kB (barring Apple
A8, used by iPhone 6 back in 2014, which uses 8kB). This commit clamps
texture size at 16kB. Note that while it fixes Zed crash, using a font
size that hits the limit is still pretty unusable - the users will still
have a pretty unusable editor, but at least it won't crash for them.



Release Notes:

- Fixed crashes with huge `buffer_font_size` values.
2024-04-09 14:09:09 +02:00
..
2024-03-28 18:32:11 +01:00
2024-03-20 15:52:02 +01:00
2024-03-11 10:45:57 +01:00
2024-03-11 10:45:57 +01:00
2024-04-06 19:48:11 -07:00
2024-03-26 16:10:09 -07:00
2024-03-14 17:05:07 -04:00
2024-03-28 18:32:11 +01:00