Modify the UI font generation process, add script
This commit is contained in:
parent
5a2c2cc1b1
commit
9ada1cc210
5 changed files with 27 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -21,6 +21,8 @@ clients/sfzprint
|
||||||
|
|
||||||
/vst/download/
|
/vst/download/
|
||||||
|
|
||||||
|
/editor/external/fluentui-system-icons/
|
||||||
|
|
||||||
# gh-pages unstaged files:
|
# gh-pages unstaged files:
|
||||||
_api/
|
_api/
|
||||||
_site/
|
_site/
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ set(EDITOR_RESOURCES
|
||||||
icon_white@2x.png
|
icon_white@2x.png
|
||||||
knob48.png
|
knob48.png
|
||||||
knob48@2x.png
|
knob48@2x.png
|
||||||
Fonts/fluentui-system-regular-20.ttf
|
Fonts/sfizz-fluentui-system-r20.ttf
|
||||||
Fonts/Roboto-Regular.ttf
|
Fonts/Roboto-Regular.ttf
|
||||||
PARENT_SCOPE)
|
PARENT_SCOPE)
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -497,7 +497,7 @@ void Editor::Impl::createFrameContents()
|
||||||
};
|
};
|
||||||
auto createGlyphButton = [this, &theme](UTF8StringPtr glyph, const CRect& bounds, int tag, int fontsize) {
|
auto createGlyphButton = [this, &theme](UTF8StringPtr glyph, const CRect& bounds, int tag, int fontsize) {
|
||||||
STextButton* btn = new STextButton(bounds, this, tag, glyph);
|
STextButton* btn = new STextButton(bounds, this, tag, glyph);
|
||||||
btn->setFont(new CFontDesc("Fluent System Regular W20", fontsize));
|
btn->setFont(new CFontDesc("Sfizz Fluent System R20", fontsize));
|
||||||
btn->setTextColor(theme->icon);
|
btn->setTextColor(theme->icon);
|
||||||
btn->setHoverColor(theme->iconHighlight);
|
btn->setHoverColor(theme->iconHighlight);
|
||||||
btn->setFrameColor(CColor(0x00, 0x00, 0x00, 0x00));
|
btn->setFrameColor(CColor(0x00, 0x00, 0x00, 0x00));
|
||||||
|
|
|
||||||
23
scripts/generate_ui_fonts.sh
Executable file
23
scripts/generate_ui_fonts.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if ! test -d "src"; then
|
||||||
|
echo "Please run this in the project root directory."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
root="`pwd`"
|
||||||
|
fonts="$root/editor/resources/Fonts"
|
||||||
|
|
||||||
|
if test ! -d editor/external/fluentui-system-icons; then
|
||||||
|
cd editor/external
|
||||||
|
git clone https://github.com/sfztools/fluentui-system-icons.git
|
||||||
|
cd fluentui-system-icons
|
||||||
|
else
|
||||||
|
cd editor/external/fluentui-system-icons
|
||||||
|
git checkout master
|
||||||
|
git pull origin master
|
||||||
|
fi
|
||||||
|
|
||||||
|
./generate_icons_font.py -s regular -w 20 -n 'Sfizz Fluent System R20' \
|
||||||
|
-o "$fonts/sfizz-fluentui-system-r20.ttf"
|
||||||
Loading…
Add table
Reference in a new issue