Implement FontChooserDialog (#1637)

* Implement FontChooserDialog

* Minor fixes

* Fixes 2

* Add Reset default font button

* Add failsafe

* reduce uninteresting exception message

* Add remarks to use AttachExtraGlyphsForDalamudLanguage

* Support advanced font configuration options

* fixes

* Shift ui elements

* more fixes

* Add To(Localized)String for IFontSpec

* Untie GlobalFontScale from default font size

* Layout fixes

* Make UiBuilder.DefaultFontSize point to user configured value

* Update example for NewDelegateFontHandle

* Font interfaces: write notes on not intended for plugins to implement

* Update default gamma to 1.7 to match closer to prev behavior (1.4**2)

* Fix console window layout
This commit is contained in:
srkizer 2024-02-14 05:09:46 +09:00 committed by GitHub
parent 3b3823d4e6
commit 34daa73612
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 2478 additions and 81 deletions

View file

@ -705,13 +705,13 @@ internal class InterfaceManager : IDisposable, IServiceType
using (this.dalamudAtlas.SuppressAutoRebuild())
{
this.DefaultFontHandle = (FontHandle)this.dalamudAtlas.NewDelegateFontHandle(
e => e.OnPreBuild(tk => tk.AddDalamudDefaultFont(DefaultFontSizePx)));
e => e.OnPreBuild(tk => tk.AddDalamudDefaultFont(-1)));
this.IconFontHandle = (FontHandle)this.dalamudAtlas.NewDelegateFontHandle(
e => e.OnPreBuild(
tk => tk.AddFontAwesomeIconFont(
new()
{
SizePx = DefaultFontSizePx,
SizePx = Service<FontAtlasFactory>.Get().DefaultFontSpec.SizePx,
GlyphMinAdvanceX = DefaultFontSizePx,
GlyphMaxAdvanceX = DefaultFontSizePx,
})));
@ -719,7 +719,10 @@ internal class InterfaceManager : IDisposable, IServiceType
e => e.OnPreBuild(
tk => tk.AddDalamudAssetFont(
DalamudAsset.InconsolataRegular,
new() { SizePx = DefaultFontSizePx })));
new()
{
SizePx = Service<FontAtlasFactory>.Get().DefaultFontSpec.SizePx,
})));
this.dalamudAtlas.BuildStepChange += e => e.OnPostBuild(
tk =>
{