Files
oak-gpui/crates
张小白 5103995c32 windows: Fix incorrect font rendering (#11545)
Previously, `DirectWrite` had been following the text system
implementation on `macOS`, using the font's postscript name to
differentiate between different font faces. However, I noticed
occasional rendering issues, such as fonts incorrectly rendering as
italics. Later, I discovered that on `Windows`, the postscript name is
**not** unique. Surprisingly, even the same font can have different
postscript names on macOS and Windows! It's hard to believe! The
postscript name of a font face should be obtained from the same font
table. Why would the same font face have different names?

For example, the postscript name of ZedMono on `macOS` is
`Zed-Mono-Bold-Extended-Italic`, while on `Windows`, it is
`Zed-Mono-Extended`, missing weight and style information, leading to
incorrect rendering.

This PR introduces a `FontIdentifier` struct to uniquely identify font
faces.

Release Notes:

- N/A
2024-05-08 10:58:31 -07:00
..
2024-05-03 12:50:42 -07:00
2024-04-23 15:33:09 -06:00
2024-05-07 15:38:03 -07:00
2024-04-23 13:31:21 -04:00
2024-03-28 18:32:11 +01:00
2024-04-11 15:36:35 -06:00
2024-04-26 13:25:25 -06:00
2024-04-30 23:31:59 -06:00
2024-05-03 12:50:42 -07:00
2024-03-11 10:45:57 +01:00
2024-05-05 15:02:50 +02:00
2024-03-26 16:10:09 -07:00
2024-04-26 13:25:25 -06:00
2024-05-06 12:58:11 +02:00
2024-05-05 15:02:50 +02:00
2024-05-07 15:38:03 -07:00
2024-05-03 12:50:42 -07:00
2024-04-11 23:09:12 +02:00
2024-05-05 15:02:50 +02:00
2024-04-15 14:21:52 +02:00
2024-05-07 16:36:13 -04:00
2024-05-03 12:50:42 -07:00
2024-05-08 10:54:48 -07:00
2024-05-08 12:05:45 -04:00