Compare commits
6 Commits
git-panel-
...
ibm_plex
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0d4c82c0c | ||
|
|
8e6fac76df | ||
|
|
a027217629 | ||
|
|
6183b02db0 | ||
|
|
ced0d608ca | ||
|
|
4a9e15b1b1 |
BIN
assets/fonts/ibm-plex-mono/IBMPlexMono-Bold.ttf
Normal file
BIN
assets/fonts/ibm-plex-mono/IBMPlexMono-Bold.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/ibm-plex-mono/IBMPlexMono-BoldItalic.ttf
Normal file
BIN
assets/fonts/ibm-plex-mono/IBMPlexMono-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/ibm-plex-mono/IBMPlexMono-Italic.ttf
Normal file
BIN
assets/fonts/ibm-plex-mono/IBMPlexMono-Italic.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf
Normal file
BIN
assets/fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/ibm-plex-sans/IBMPlexSans-Bold.ttf
Normal file
BIN
assets/fonts/ibm-plex-sans/IBMPlexSans-Bold.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/ibm-plex-sans/IBMPlexSans-BoldItalic.ttf
Normal file
BIN
assets/fonts/ibm-plex-sans/IBMPlexSans-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/ibm-plex-sans/IBMPlexSans-Italic.ttf
Normal file
BIN
assets/fonts/ibm-plex-sans/IBMPlexSans-Italic.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf
Normal file
BIN
assets/fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -27,14 +27,14 @@
|
||||
"inline_completion_provider": "copilot"
|
||||
},
|
||||
// The name of a font to use for rendering text in the editor
|
||||
"buffer_font_family": "Zed Plex Mono",
|
||||
"buffer_font_family": "IBM Plex Mono",
|
||||
// Set the buffer text's font fallbacks, this will be merged with
|
||||
// the platform's default fallbacks.
|
||||
"buffer_font_fallbacks": null,
|
||||
// The OpenType features to enable for text in the editor.
|
||||
"buffer_font_features": {
|
||||
// Disable ligatures:
|
||||
// "calt": false
|
||||
"calt": false
|
||||
},
|
||||
// The default font size for text in the editor
|
||||
"buffer_font_size": 15,
|
||||
@@ -53,7 +53,7 @@
|
||||
"buffer_line_height": "comfortable",
|
||||
// The name of a font to use for rendering text in the UI
|
||||
// You can set this to ".SystemUIFont" to use the system font
|
||||
"ui_font_family": "Zed Plex Sans",
|
||||
"ui_font_family": "IBM Plex Sans",
|
||||
// Set the UI's font fallbacks, this will be merged with the platform's
|
||||
// default font fallbacks.
|
||||
"ui_font_fallbacks": null,
|
||||
@@ -753,7 +753,7 @@
|
||||
// "font_size": 15,
|
||||
// Set the terminal's font family. If this option is not included,
|
||||
// the terminal will default to matching the buffer's font family.
|
||||
// "font_family": "Zed Plex Mono",
|
||||
// "font_family": "IBM Plex Mono",
|
||||
// Set the terminal's font fallbacks. If this option is not included,
|
||||
// the terminal will default to matching the buffer's font fallbacks.
|
||||
// This will be merged with the platform's default font fallbacks
|
||||
|
||||
@@ -58,7 +58,7 @@ impl Assets {
|
||||
pub fn load_test_fonts(&self, cx: &AppContext) {
|
||||
cx.text_system()
|
||||
.add_fonts(vec![self
|
||||
.load("fonts/plex-mono/ZedPlexMono-Regular.ttf")
|
||||
.load("fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf")
|
||||
.unwrap()
|
||||
.unwrap()])
|
||||
.unwrap()
|
||||
|
||||
@@ -25,7 +25,7 @@ pub fn marked_display_snapshot(
|
||||
let (unmarked_text, markers) = marked_text_offsets(text);
|
||||
|
||||
let font = Font {
|
||||
family: "Zed Plex Mono".into(),
|
||||
family: "IBM Plex Mono".into(),
|
||||
features: FontFeatures::default(),
|
||||
fallbacks: None,
|
||||
weight: FontWeight::default(),
|
||||
|
||||
@@ -198,7 +198,7 @@ impl CosmicTextSystemState {
|
||||
) -> Result<SmallVec<[FontId; 4]>> {
|
||||
// TODO: Determine the proper system UI font.
|
||||
let name = if name == ".SystemUIFont" {
|
||||
"Zed Plex Sans"
|
||||
"IBM Plex Sans"
|
||||
} else {
|
||||
name
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ impl TextSystem {
|
||||
font_runs_pool: Mutex::default(),
|
||||
fallback_font_stack: smallvec![
|
||||
// TODO: Remove this when Linux have implemented setting fallbacks.
|
||||
font("Zed Plex Mono"),
|
||||
font("IBM Plex Mono"),
|
||||
font("Helvetica"),
|
||||
font("Segoe UI"), // Windows
|
||||
font("Cantarell"), // Gnome
|
||||
|
||||
@@ -223,12 +223,12 @@ mod tests {
|
||||
let cx = TestAppContext::new(dispatcher, None);
|
||||
cx.text_system()
|
||||
.add_fonts(vec![std::fs::read(
|
||||
"../../assets/fonts/plex-mono/ZedPlexMono-Regular.ttf",
|
||||
"../../assets/fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf",
|
||||
)
|
||||
.unwrap()
|
||||
.into()])
|
||||
.unwrap();
|
||||
let id = cx.text_system().font_id(&font("Zed Plex Mono")).unwrap();
|
||||
let id = cx.text_system().font_id(&font("IBM Plex Mono")).unwrap();
|
||||
LineWrapper::new(id, px(16.), cx.text_system().platform_text_system.clone())
|
||||
}
|
||||
|
||||
|
||||
@@ -116,12 +116,12 @@ pub fn main() {
|
||||
cx.new_view(|cx| {
|
||||
let markdown_style = MarkdownStyle {
|
||||
base_text_style: gpui::TextStyle {
|
||||
font_family: "Zed Plex Sans".into(),
|
||||
font_family: "IBM Plex Sans".into(),
|
||||
color: cx.theme().colors().terminal_ansi_black,
|
||||
..Default::default()
|
||||
},
|
||||
code_block: StyleRefinement::default()
|
||||
.font_family("Zed Plex Mono")
|
||||
.font_family("IBM Plex Mono")
|
||||
.m(rems(1.))
|
||||
.bg(rgb(0xAAAAAAA)),
|
||||
inline_code: gpui::TextStyleRefinement {
|
||||
|
||||
@@ -121,7 +121,7 @@ impl Render for StoryWrapper {
|
||||
.flex()
|
||||
.flex_col()
|
||||
.size_full()
|
||||
.font_family("Zed Plex Mono")
|
||||
.font_family("IBM Plex Mono")
|
||||
.child(self.story.clone())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3314,11 +3314,11 @@ mod tests {
|
||||
cx.text_system()
|
||||
.add_fonts(vec![
|
||||
Assets
|
||||
.load("fonts/plex-mono/ZedPlexMono-Regular.ttf")
|
||||
.load("fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf")
|
||||
.unwrap()
|
||||
.unwrap(),
|
||||
Assets
|
||||
.load("fonts/plex-sans/ZedPlexSans-Regular.ttf")
|
||||
.load("fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf")
|
||||
.unwrap()
|
||||
.unwrap(),
|
||||
])
|
||||
|
||||
@@ -153,7 +153,7 @@ Extensions that provide language servers may also provide default settings for t
|
||||
|
||||
- Description: The name of a font to use for rendering text in the editor.
|
||||
- Setting: `buffer_font_family`
|
||||
- Default: `Zed Plex Mono`
|
||||
- Default: `IBM Plex Mono`
|
||||
|
||||
**Options**
|
||||
|
||||
@@ -2290,7 +2290,7 @@ For example, to use `Nerd Font` as a fallback, add the following to your setting
|
||||
"soft_wrap": "none",
|
||||
|
||||
"buffer_font_size": 18,
|
||||
"buffer_font_family": "Zed Plex Mono",
|
||||
"buffer_font_family": "IBM Plex Mono",
|
||||
|
||||
"autosave": "on_focus_change",
|
||||
"format_on_save": "off",
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
TBD: WIP. Zed Fonts documentation. This is currently not linked from SUMMARY.md are so unpublished.
|
||||
-->
|
||||
|
||||
Zed ships two fonts: Zed Plex Mono and Zed Plex Sans. These are based on IBM Plex Mono and IBM Plex Sans, respectively.
|
||||
|
||||
<!--
|
||||
TBD: Document how Zed Plex font files were created. Repo links, etc.
|
||||
-->
|
||||
Zed ships two font faces by [Mike Abbink](https://mikeabbink.com/typefaces/) and [Bold Monday](https://boldmonday.com/custom/ibm/): IBM Plex Mono and IBM Plex Sans.
|
||||
|
||||
## Settings
|
||||
|
||||
@@ -17,10 +13,12 @@ TBD: Explain various font settings in Zed.
|
||||
-->
|
||||
|
||||
- Buffer fonts
|
||||
- `buffer-font-family`
|
||||
- `buffer-font-features`
|
||||
- `buffer-font-size`
|
||||
- `buffer-line-height`
|
||||
- `buffer_font_family`
|
||||
- `buffer_font_features`
|
||||
- `buffer_font_size`
|
||||
- `buffer_font_weight`
|
||||
- `buffer_font_fallbacks`
|
||||
- `buffer_line_height`
|
||||
- UI fonts
|
||||
- `ui_font_family`
|
||||
- `ui_font_fallbacks`
|
||||
@@ -28,17 +26,24 @@ TBD: Explain various font settings in Zed.
|
||||
- `ui_font_weight`
|
||||
- `ui_font_size`
|
||||
- Terminal fonts
|
||||
- `terminal.font-size`
|
||||
- `terminal.font-family`
|
||||
- `terminal.font-features`
|
||||
- `terminal.font_size`
|
||||
- `terminal.font_family`
|
||||
- `terminal.font_features`
|
||||
- `terminal.line_height`
|
||||
- Other settings:
|
||||
- `active-pane-magnification`
|
||||
- `active_pane_magnification`
|
||||
|
||||
## Old Zed Fonts
|
||||
## Old Fonts
|
||||
|
||||
Previously, Zed shipped with `Zed Mono` and `Zed Sans`, customized versions of the [Iosevka](https://typeof.net/Iosevka/) typeface. You can find more about them in the [zed-fonts](https://github.com/zed-industries/zed-fonts/) repository.
|
||||
### Zed Plex
|
||||
|
||||
Here's how you can use the old Zed fonts instead of `Zed Plex Mono` and `Zed Plex Sans`:
|
||||
Previously Zed shipped slightly customized versions of `IBM Plex Mono` and `IBM Plex Sans` branded as `Zed Plex Mono` and `Zed Plex Sans`. We now ship unchanged versions of `IBM Plex` fonts instead.
|
||||
|
||||
### Zed Mono & Zed Sans {#zed-fonts}
|
||||
|
||||
Prior to that, Zed shipped with `Zed Mono` and `Zed Sans`, customized versions of the [Iosevka](https://typeof.net/Iosevka/) typeface. You can find more about them in the [zed-fonts](https://github.com/zed-industries/zed-fonts/) repository.
|
||||
|
||||
Here's how you can use `Zed Mono` and `Zed Sans`:
|
||||
|
||||
1. Download [zed-app-fonts-1.2.0.zip](https://github.com/zed-industries/zed-fonts/releases/download/1.2.0/zed-app-fonts-1.2.0.zip) from the [zed-fonts releases](https://github.com/zed-industries/zed-fonts/releases) page.
|
||||
2. Open macOS `Font Book.app`
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
ZSTD_SYS_USE_PKG_CONFIG = true;
|
||||
FONTCONFIG_FILE = makeFontsConf {
|
||||
fontDirectories = [
|
||||
"../assets/fonts/zed-mono"
|
||||
"../assets/fonts/zed-sans"
|
||||
"../assets/fonts/ibm-plex-mono"
|
||||
"../assets/fonts/ibm-plex-sans"
|
||||
];
|
||||
};
|
||||
ZED_UPDATE_EXPLANATION = "zed has been installed using nix. Auto-updates have thus been disabled.";
|
||||
|
||||
@@ -43,8 +43,8 @@ in
|
||||
|
||||
FONTCONFIG_FILE = pkgs.makeFontsConf {
|
||||
fontDirectories = [
|
||||
"./assets/fonts/zed-mono"
|
||||
"./assets/fonts/zed-sans"
|
||||
"./assets/fonts/ibm-plex-mono"
|
||||
"./assets/fonts/ibm-plex-sans"
|
||||
];
|
||||
};
|
||||
ZSTD_SYS_USE_PKG_CONFIG = true;
|
||||
|
||||
55
script/update-ibm-plex
Executable file
55
script/update-ibm-plex
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
REPO="https://github.com/IBM/plex"
|
||||
ASSET_FONTS_DIR="assets/fonts"
|
||||
FONT_NAMES=("plex-sans" "plex-mono")
|
||||
FILENAMES=("IBMPlexSans" "IBMPlexMono")
|
||||
STYLES=("Regular" "Italic" "Bold" "BoldItalic")
|
||||
|
||||
run_else() { $1 >/dev/null 2>&1 || { echo "$2"; exit 1; }; }
|
||||
|
||||
run_else "gh" "gh CLI missing"
|
||||
run_else "which unzip" "unzip CLI missing"
|
||||
run_else "gh auth status" "run: gh auth login"
|
||||
run_else "ls ${ASSET_FONTS_DIR}" "Not in repo root. Run from repo root."
|
||||
|
||||
pushd "${ASSET_FONTS_DIR}"
|
||||
|
||||
for i in $(seq 0 $((${#FONT_NAMES[@]} - 1))); do
|
||||
font="${FONT_NAMES[$i]}"
|
||||
filename="${FILENAMES[$i]}"
|
||||
tagName=$(gh release list \
|
||||
--repo "$REPO" \
|
||||
--json tagName,createdAt,isDraft,isPrerelease \
|
||||
--jq '
|
||||
[.[] | select(.tagName | startswith("'"@ibm/$font"'@"))
|
||||
| select(.isDraft == false and .isPrerelease == false)
|
||||
| {tagName, createdAt}]
|
||||
| sort_by(.tagName | split("@")[2] | split(".") | map(tonumber))
|
||||
| reverse
|
||||
| first
|
||||
| .tagName
|
||||
')
|
||||
releaseDate=$(gh api /repos/IBM/plex/releases/tags/"$tagName" --jq '.published_at[:10]')
|
||||
releaseUrl=$(gh api /repos/IBM/plex/releases/tags/"$tagName" --jq '.html_url')
|
||||
echo "- Update [${tagName}](${releaseUrl})"
|
||||
zipFileName=$(gh api /repos/IBM/plex/releases/tags/"$tagName" --jq '.assets[].name | select(endswith(".zip"))')
|
||||
gh release download "$tagName" \
|
||||
--repo https://github.com/IBM/plex \
|
||||
--clobber \
|
||||
--pattern "$zipFileName"
|
||||
|
||||
prefix="ibm-${font}/fonts/complete/ttf"
|
||||
out_dir="ibm-${font}"
|
||||
files_to_extract="$prefix/license.txt"
|
||||
for style in "${STYLES[@]}"; do
|
||||
files_to_extract+=" $prefix/${filename}-$style.ttf"
|
||||
done
|
||||
unzip -q -o -j "$zipFileName" $files_to_extract -d $out_dir
|
||||
rm "$zipFileName"
|
||||
done
|
||||
echo
|
||||
echo "\`\`\`"
|
||||
shasum -a 256 */*.ttf
|
||||
echo "\`\`\`"
|
||||
Reference in New Issue
Block a user