ZIm/crates/ui/src/components
Marshall Bowers 0329b4a5cb
Allow loading "Segoe Fluent Icons" font on macOS (#9421)
This PR updates the `TextSystem` on macOS to allow loading the "Segoe
Fluent Icons" font.

We're using this font in the Storybook to render the `TitleBar` as it
would appear on Windows despite us running it on macOS. This is to make
things easier for iterating on UI design without needing to test on each
individual platform.

However, the "Segoe Fluent Icons" font does not have a glyph for the `m`
character, causing it to run afoul of a precautionary check added in
#4029, which ultimately results in the font not being loaded (and thus
rendering as a missing glyph).

We work around this by simply ignoring this check if the font we're
trying to load is specifically "Segoe Fluent Icons".

I think longer-term we'll need to revisit the behavior in the editor
that is causing the panics when the `m` glyph is missing from the font,
but that's a problem for a different day.

#### Before

<img width="1283" alt="Screenshot 2024-03-15 at 3 34 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/c0ddd46d-8599-4729-ac98-75522b33e25b">

#### After

<img width="1113" alt="Screenshot 2024-03-15 at 5 12 36 PM"
src="https://github.com/zed-industries/zed/assets/1486634/183c2b43-5e4f-4516-8856-7a2d45ed8b2e">

Note that you currently need to install the "Segoe Fluent Icons" font
yourself—either installing it globally or placing the `.ttf` file in the
`assets/fonts` directory—in order to see the icons rendered. I'd like to
look into getting this, but there are restrictions on the distribution
of the font on non-Windows platforms that will need to be followed.

Release Notes:

- N/A
2024-03-15 17:35:10 -04:00
..
avatar Encode rem values derived from pixels using rems_from_px (#9367) 2024-03-14 16:39:55 -04:00
button Encode rem values derived from pixels using rems_from_px (#9367) 2024-03-14 16:39:55 -04:00
checkbox ui: Center Checkbox within its container (#9201) 2024-03-11 18:08:31 -04:00
label Switch LSP prompts to use a non-blocking toast (#8312) 2024-02-23 15:18:32 -08:00
list Inset ContextMenu headers (#9197) 2024-03-11 16:28:16 -04:00
stories ui: Refine TitleBar component (#9415) 2024-03-15 15:48:07 -04:00
title_bar Allow loading "Segoe Fluent Icons" font on macOS (#9421) 2024-03-15 17:35:10 -04:00
avatar.rs Add dedicated indicator for showing a muted call participant (#4076) 2024-01-16 16:18:06 -05:00
button.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
checkbox.rs Add CheckboxWithLabel component (#7881) 2024-02-15 21:00:30 -05:00
context_menu.rs Inset ContextMenu headers (#9197) 2024-03-11 16:28:16 -04:00
disclosure.rs Make clicking ListHeader labels toggle the disclosure (#4140) 2024-01-18 18:21:53 -05:00
divider.rs Clean up references in doc comments in ui and theme crates (#3985) 2024-01-09 15:22:36 -05:00
icon.rs Rework/redesign message replies (#9049) 2024-03-14 20:45:53 -06:00
indicator.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
keybinding.rs ui: Refine TitleBar component (#9415) 2024-03-15 15:48:07 -04:00
label.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
list.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
popover.rs Finish documenting the action, asset, color, and element modules in GPUI 2024-01-20 20:15:23 -08:00
popover_menu.rs Encode rem values derived from pixels using rems_from_px (#9367) 2024-03-14 16:39:55 -04:00
right_click_menu.rs Fix mouse interactions with the project and branch switchers (#9222) 2024-03-12 15:30:27 +01:00
stack.rs Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053) 2024-01-15 11:34:06 -05:00
stories.rs ui: Refine TitleBar component (#9415) 2024-03-15 15:48:07 -04:00
tab.rs Encode rem values derived from pixels using rems_from_px (#9367) 2024-03-14 16:39:55 -04:00
tab_bar.rs Encode rem values derived from pixels using rems_from_px (#9367) 2024-03-14 16:39:55 -04:00
title_bar.rs ui: Refine TitleBar component (#9415) 2024-03-15 15:48:07 -04:00
tooltip.rs Add a hover menu to see who's in a channel 2024-01-26 12:25:00 -07:00