diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-04-14 23:17:36 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-04-15 22:27:56 +0300 |
| commit | 6ee601c642b3a4fa182334eb1ca015d71d6eaedd (patch) | |
| tree | 08f58a6dd7f430a21b63d87be5b73ed7fbae5508 /indra | |
| parent | 45f8e60cb4ec113e0bf07f28f84405e25ba356fd (diff) | |
#2023 Load from a variable font
WIP, beacsue variable fonts are not yeat included.
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llrender/llfontfreetype.cpp | 106 | ||||
| -rw-r--r-- | indra/llrender/llfontfreetype.h | 4 | ||||
| -rw-r--r-- | indra/llrender/llfontgl.cpp | 4 | ||||
| -rw-r--r-- | indra/llrender/llfontgl.h | 2 | ||||
| -rw-r--r-- | indra/llrender/llfontregistry.cpp | 22 | ||||
| -rw-r--r-- | indra/llrender/llfontregistry.h | 11 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/fonts.xml | 22 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/ja/fonts.xml | 62 |
8 files changed, 149 insertions, 84 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 063e308da0..9b00df2bf6 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -39,6 +39,7 @@ // For some reason, this won't work if it's not wrapped in the ifdef #ifdef FT_FREETYPE_H #include FT_FREETYPE_H +#include FT_MULTIPLE_MASTERS_H #endif #include "lldir.h" @@ -165,7 +166,7 @@ LLFontFreetype::~LLFontFreetype() // mFallbackFonts cleaned up by LLPointer destructor } -bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags) +bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 weight, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags) { // Don't leak face objects. This is also needed to deal with // changed font file names. @@ -191,6 +192,18 @@ bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v mIsFallback = is_fallback; mHinting = hinting; mFontFlags = flags; + mWeight = weight; + + bool variable_font = false; + if (weight >= 0) + { + variable_font = setVariationAxis("wght", static_cast<F32>(weight)); + + // For Inter, also set optical size based on point size + // This makes text look better at different sizes + setVariationAxis("opsz", point_size); + } + F32 pixels_per_em = (point_size / 72.f)*vert_dpi; // Size in inches * dpi error = FT_Set_Char_Size(mFTFace, /* handle to face object */ @@ -252,6 +265,12 @@ bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v // Ex: Inter SemiBold doesn't have FT_STYLE_FLAG_BOLD and without this style it would be bolded programmatically. mStyle |= LLFontGL::BOLD; } + else if (weight >= 600 && variable_font) + { + // If the font is heavy enough, consider it bold and avoid programmatic bolding + // even if it doesn't have the bold style set. + mStyle |= LLFontGL::BOLD; + } if(mFTFace->style_flags & FT_STYLE_FLAG_ITALIC) { @@ -359,12 +378,8 @@ F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta)); - if (mFTFace->face_flags & FT_FACE_FLAG_SCALABLE) - { - // Return the X advance - return (F32)(delta.x * (1.0 / 64.0)); - } - return (F32)delta.x; + // ft_kerning_unfitted mode always returns 26.6 fixed-point values + return (F32)(delta.x * (1.0 / 64.0)); } F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LLFontGlyphInfo* right_glyph_info) const @@ -379,12 +394,8 @@ F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LL llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta)); - if (mFTFace->face_flags & FT_FACE_FLAG_SCALABLE) - { - // Return the X advance - return (F32)(delta.x * (1.0 / 64.0)); - } - return (F32)delta.x; + // ft_kerning_unfitted mode always returns 26.6 fixed-point values + return (F32)(delta.x * (1.0 / 64.0)); } bool LLFontFreetype::hasGlyph(llwchar wch) const @@ -697,7 +708,7 @@ void LLFontFreetype::renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, ll void LLFontFreetype::reset(F32 vert_dpi, F32 horz_dpi) { resetBitmapCache(); - loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mIsFallback, 0, mHinting, mFontFlags); + loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mWeight, mIsFallback, 0, mHinting, mFontFlags); if (!mIsFallback) { // This is the head of the list - need to rebuild ourself and all fallbacks. @@ -865,6 +876,73 @@ void LLFontFreetype::setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32 } } +bool LLFontFreetype::setVariationAxis(const std::string& axis_tag, F32 value) +{ + if (!mFTFace) + return false; + + // Check if this is a variable font + FT_MM_Var* master = nullptr; + if (FT_Get_MM_Var(mFTFace, &master) != 0) + { + // Not a variable font - this is not an error, just silently skip + return false; + } + + // Find the axis by tag (e.g., "wght" for weight) + FT_UInt axis_index = 0; + bool found = false; + for (FT_UInt i = 0; i < master->num_axis; i++) + { + // Compare the 4-byte tag + if (master->axis[i].tag == FT_MAKE_TAG(axis_tag[0], axis_tag[1], axis_tag[2], axis_tag[3])) + { + axis_index = i; + found = true; + + // Clamp value to valid range for this axis + F32 min_val = master->axis[i].minimum / 65536.0f; + F32 max_val = master->axis[i].maximum / 65536.0f; + value = llclamp(value, min_val, max_val); + + break; + } + } + + if (!found) + { + FT_Done_MM_Var(gFTLibrary, master); + LL_WARNS_ONCE("FontVariation") << "Axis '" << axis_tag << "' not found in font: " << mName << LL_ENDL; + return false; + } + + FT_UInt num_coords = master->num_axis; + FT_Fixed* coords = new FT_Fixed[num_coords]; + + // Get current coordinates + FT_Get_Var_Design_Coordinates(mFTFace, num_coords, coords); + + // Update the specific axis + coords[axis_index] = (FT_Fixed)(value * 65536.0f); + + // Set all coordinates + int error = FT_Set_Var_Design_Coordinates(mFTFace, num_coords, coords); + + delete[] coords; + FT_Done_MM_Var(gFTLibrary, master); + + if (error != 0) + { + LL_WARNS() << "Failed to set variation coordinates for " << axis_tag + << " = " << value << " in font: " << mName << LL_ENDL; + return false; + } + + LL_INFOS("FontVariation") << "Set " << axis_tag << " = " << value + << " for font: " << mName << LL_ENDL; + return true; +} + namespace ll { diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h index 96f99fd31c..d2b128e4ce 100644 --- a/indra/llrender/llfontfreetype.h +++ b/indra/llrender/llfontfreetype.h @@ -101,7 +101,7 @@ public: // is_fallback should be true for fallback fonts that aren't used // to render directly (Unicode backup, primarily) - bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags); + bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 weight, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags); S32 getNumFaces(const std::string& filename); @@ -163,6 +163,7 @@ private: void resetBitmapCache(); void setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32 width, U32 height, U8 *data, S32 stride = 0) const; bool setSubImageBGRA(U32 x, U32 y, U32 bitmap_num, U16 width, U16 height, const U8* data, U32 stride) const; + bool setVariationAxis(const std::string& axis_tag, F32 value); bool hasGlyph(llwchar wch) const; // Has a glyph for this character LLFontGlyphInfo* addGlyph(llwchar wch, EFontGlyphType glyph_type) const; // Add a new character to the font if necessary LLFontGlyphInfo* addGlyphFromFont( @@ -187,6 +188,7 @@ private: bool mIsFallback; EFontHinting mHinting; S32 mFontFlags; + S32 mWeight = -1; typedef std::pair<LLPointer<LLFontFreetype>, char_functor_t> fallback_font_t; typedef std::vector<fallback_font_t> fallback_font_vector_t; fallback_font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars) diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index d95eea526b..b2ca9cce75 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -90,14 +90,14 @@ void LLFontGL::destroyGL() mFontFreetype->destroyGL(); } -bool LLFontGL::loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags) +bool LLFontGL::loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, S32 weight, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags) { if(mFontFreetype == reinterpret_cast<LLFontFreetype*>(NULL)) { mFontFreetype = new LLFontFreetype; } - return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, is_fallback, face_n, hinting, flags); + return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, weight, is_fallback, face_n, hinting, flags); } S32 LLFontGL::getNumFaces(const std::string& filename) diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 652cec8e5b..7743d61e40 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -87,7 +87,7 @@ public: void destroyGL(); - bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags); + bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, S32 weight, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags); S32 getNumFaces(const std::string& filename); S32 getCacheGeneration() const; diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 370b08319f..a107b263d8 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -181,16 +181,16 @@ LLFontDescriptor LLFontDescriptor::normalize() const return LLFontDescriptor(new_name,new_size,new_style, getFontFiles(), getFontCollectionFiles()); } -void LLFontDescriptor::addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor) +void LLFontDescriptor::addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor) { char_functor_map_t::const_iterator it = mCharFunctors.find(char_functor); - mFontFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, (mCharFunctors.end() != it) ? it->second : nullptr)); + mFontFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, weight, (mCharFunctors.end() != it) ? it->second : nullptr)); } -void LLFontDescriptor::addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor) +void LLFontDescriptor::addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor) { char_functor_map_t::const_iterator it = mCharFunctors.find(char_functor); - mFontCollectionFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, (mCharFunctors.end() != it) ? it->second : nullptr)); + mFontCollectionFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, weight, (mCharFunctors.end() != it) ? it->second : nullptr)); } LLFontRegistry::LLFontRegistry(bool create_gl_textures) @@ -291,6 +291,7 @@ bool font_desc_init_from_xml(LLXMLNodePtr node, LLFontDescriptor& desc) std::string char_functor; EFontHinting hinting = EFontHinting::FORCE_AUTOHINT; S32 flags = 0; + S32 weight = -1; if (child->hasAttribute("functor")) { @@ -335,17 +336,22 @@ bool font_desc_init_from_xml(LLXMLNodePtr node, LLFontDescriptor& desc) child->getAttributeF32("size_delta", size_delta); } + if (child->hasAttribute("font_weight")) + { + child->getAttributeS32("font_weight", weight); + } + if (child->hasAttribute("load_collection")) { bool col = false; child->getAttributeBOOL("load_collection", col); if (col) { - desc.addFontCollectionFile(font_file_name, hinting, flags, size_delta, char_functor); + desc.addFontCollectionFile(font_file_name, hinting, flags, size_delta, weight, char_functor); } } - desc.addFontFile(font_file_name, hinting, flags, size_delta, char_functor); + desc.addFontFile(font_file_name, hinting, flags, size_delta, weight, char_functor); } else if (child->hasName("os")) { @@ -502,7 +508,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) // Add ultimate fallback list - generated dynamically on linux, // null elsewhere. std::transform(getUltimateFallbackList().begin(), getUltimateFallbackList().end(), std::back_inserter(font_files), - [](const std::string& file_name) { return LLFontFileInfo(file_name, EFontHinting::FORCE_AUTOHINT, 0, 0.f); }); + [](const std::string& file_name) { return LLFontFileInfo(file_name, EFontHinting::FORCE_AUTOHINT, 0, 0.f, -1); }); // Load fonts based on names. if (font_files.empty()) @@ -558,7 +564,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) fontp = new LLFontGL; } if (fontp->loadFace(font_path, point_size_scale + font_file_it->mSizeDelta, - LLFontGL::sVertDPI, LLFontGL::sHorizDPI, is_fallback, i, font_file_it->mHinting, font_file_it->mFlags)) + LLFontGL::sVertDPI, LLFontGL::sHorizDPI, font_file_it->mWeight, is_fallback, i, font_file_it->mHinting, font_file_it->mFlags)) { is_font_loaded = true; if (is_first_found) diff --git a/indra/llrender/llfontregistry.h b/indra/llrender/llfontregistry.h index a5fa9f338a..fcbb2667e4 100644 --- a/indra/llrender/llfontregistry.h +++ b/indra/llrender/llfontregistry.h @@ -43,21 +43,23 @@ enum class EFontHinting : S32 struct LLFontFileInfo { - LLFontFileInfo(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::function<bool(llwchar)>& char_functor = nullptr) + LLFontFileInfo(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::function<bool(llwchar)>& char_functor = nullptr) : FileName(file_name) , CharFunctor(char_functor) , mHinting(hinting) , mFlags(flags) , mSizeDelta(size_delta) + , mWeight(weight) { } - LLFontFileInfo(const LLFontFileInfo& ffi, EFontHinting hinting, S32 flags, F32 size_delta) + LLFontFileInfo(const LLFontFileInfo& ffi, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight) : FileName(ffi.FileName) , CharFunctor(ffi.CharFunctor) , mHinting(hinting) , mFlags(flags) , mSizeDelta(size_delta) + , mWeight(weight) { } @@ -65,6 +67,7 @@ struct LLFontFileInfo std::function<bool(llwchar)> CharFunctor; EFontHinting mHinting; S32 mFlags; + S32 mWeight; // -1 - default, whatever is in the file. // Not all fonts are the same size, Ex: dejavu is bigger than inter, // so in some cases we want to adjust relative sizes to make characters @@ -91,10 +94,10 @@ public: const std::string& getSize() const { return mSize; } void setSize(const std::string& size) { mSize = size; } - void addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor = LLStringUtil::null); + void addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor = LLStringUtil::null); const font_file_info_vec_t & getFontFiles() const { return mFontFiles; } void setFontFiles(const font_file_info_vec_t& font_files) { mFontFiles = font_files; } - void addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, const std::string& char_functor = LLStringUtil::null); + void addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor = LLStringUtil::null); const font_file_info_vec_t& getFontCollectionFiles() const { return mFontCollectionFiles; } void setFontCollectionFiles(const font_file_info_vec_t& font_collection_files) { mFontCollectionFiles = font_collection_files; } diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml index 81f5d8afe2..efa4706485 100644 --- a/indra/newview/skins/default/xui/en/fonts.xml +++ b/indra/newview/skins/default/xui/en/fonts.xml @@ -4,7 +4,7 @@ <font name="default" comment="default font files (global fallbacks)"> - <file load_collection="true" font_hinting="default">Inter_18pt-Regular.ttf</file> + <file load_collection="true" font_weight="400">Inter-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans.ttf</file> <file functor="is_emoji">TwemojiSVG.ttf</file> <os name="Windows"> @@ -37,7 +37,7 @@ <font name="SansSerifBold" comment="Name of bold sans-serif font"> - <file load_collection="true" font_hinting="default" flags="bold">Inter_18pt-ExtraBold.ttf</file> + <file load_collection="true" flags="bold" font_weight="600">Inter-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans-Bold.ttf</file> <os name="Windows"> <file>arialbd.ttf</file> @@ -50,7 +50,7 @@ <font name="SansSerif" comment="Name of san-serif font (Truetype file name)"> - <file load_collection="true" font_hinting="default">Inter_18pt-Regular.ttf</file> + <file load_collection="true" font_weight="400">Inter-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans.ttf</file> <os name="Windows"> <file>arial.ttf</file> @@ -64,7 +64,7 @@ name="SansSerif" comment="Name of bold sans-serif font" font_style="BOLD"> - <file load_collection="true" font_hinting="default" flags="bold">Inter_18pt-Bold.ttf</file> + <file load_collection="true" flags="bold" font_weight="600">Inter-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans-Bold.ttf</file> </font> @@ -72,7 +72,7 @@ name="SansSerif" comment="Name of italic sans-serif font" font_style="ITALIC"> - <file load_collection="true">Inter_18pt-Italic.ttf</file> + <file load_collection="true" font_weight="400">Inter-Italic-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans-Oblique.ttf</file> </font> @@ -80,7 +80,7 @@ name="SansSerif" comment="Name of bold italic sans-serif font" font_style="BOLD|ITALIC"> - <file load_collection="true">Inter_18pt-BoldItalic.ttf</file> + <file load_collection="true" font_weight="800">Inter-Italic-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans-BoldOblique.ttf</file> </font> @@ -121,7 +121,7 @@ <font name="Helvetica" comment="Name of Helvetica font"> - <file font_hinting="default">Inter_18pt-Regular.ttf</file> + <file font_weight="400">Inter-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans.ttf</file> <os name="Windows"> <file>arial.ttf</file> @@ -135,7 +135,7 @@ name="Helvetica" comment="Name of Helvetica font (bold)" font_style="BOLD"> - <file font_hinting="default" flags="bold">Inter_18pt-ExtraBold.ttf</file> + <file flags="bold" font_weight="800">Inter-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans-Bold.ttf</file> <os name="Windows"> <file>arialbd.ttf</file> @@ -149,7 +149,7 @@ name="Helvetica" comment="Name of Helvetica font (italic)" font_style="ITALIC"> - <file>Inter_18pt-Italic.ttf</file> + <file font_weight="400">Inter-Italic-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans-Oblique.ttf</file> <os name="Windows"> <file>ariali.ttf</file> @@ -163,7 +163,7 @@ name="Helvetica" comment="Name of Helvetica font (bold italic)" font_style="BOLD|ITALIC"> - <file>Inter_18pt-BoldItalic.ttf</file> + <file font_weight="800">Inter-Italic-VariableFont_opsz,wght.ttf</file> <file size_delta="-0.5">DejaVuSans-BoldOblique.ttf</file> <os name="Windows"> <file>arialbi.ttf</file> @@ -177,7 +177,7 @@ name="OverrideTest" comment="Name of font to test overriding"> <file>times.ttf</file> - <file font_hinting="default">Inter_18pt-Regular.ttf</file> + <file font_weight="400">Inter-VariableFont_opsz,wght.ttf</file> </font> <font_size name="Monospace" diff --git a/indra/newview/skins/default/xui/ja/fonts.xml b/indra/newview/skins/default/xui/ja/fonts.xml index 874f530f17..73abf542d4 100644 --- a/indra/newview/skins/default/xui/ja/fonts.xml +++ b/indra/newview/skins/default/xui/ja/fonts.xml @@ -4,9 +4,7 @@ <file> NotoSansCJKjp-SemiBold.otf </file> - <file load_collection="true" font_hinting="default"> - Inter_18pt-Regular.ttf - </file> + <file load_collection="true" font_weight="400">Inter-VariableFont_opsz,wght.ttf</file> <os name="Windows"> <file load_collection="true"> YuGothM.ttc @@ -82,9 +80,7 @@ <file> NotoSansCJKjp-Bold.otf </file> - <file load_collection="true" font_hinting="default" flags="bold"> - Inter_18pt-SemiBold.ttf - </file> + <file load_collection="true" font_weight="800" flags="bold">Inter-VariableFont_opsz,wght.ttf</file> <os name="Windows"> <file load_collection="true"> YuGothB.ttc @@ -104,11 +100,9 @@ </font> <font name="SansSerif" comment="Name of san-serif font (Truetype file name)"> <file> - NotoSansCJKjp-Bold.otf + NotoSansCJKjp-SemiBold.otf </file> - <file load_collection="true" font_hinting="default"> - Inter_18pt-Regular.ttf - </file> + <file load_collection="true" font_weight="400">Inter-VariableFont_opsz,wght.ttf</file> <os name="Windows"> <file> arial.ttf @@ -121,19 +115,13 @@ </os> </font> <font name="SansSerif" comment="Name of bold sans-serif font" font_style="BOLD"> - <file load_collection="true" font_hinting="default" flags="bold"> - Inter_18pt-SemiBold.ttf - </file> + <file load_collection="true" font_weight="800" flags="bold">Inter-VariableFont_opsz,wght.ttf</file> </font> <font name="SansSerif" comment="Name of italic sans-serif font" font_style="ITALIC"> - <file load_collection="true"> - Inter_18pt-Italic.ttf - </file> + <file load_collection="true" font_weight="400">Inter-Italic-VariableFont_opsz,wght.ttf</file> </font> <font name="SansSerif" comment="Name of bold italic sans-serif font" font_style="BOLD|ITALIC"> - <file load_collection="true" font_hinting="default" flags="bold"> - Inter_18pt-SemiBoldItalic.ttf - </file> + <file load_collection="true" flags="bold" font_weight="800">Inter-Italic-VariableFont_opsz,wght.ttf</file> </font> <font name="Monospace" comment="Name of monospace font"> <file> @@ -144,29 +132,25 @@ </file> </font> <font name="DejaVu" comment="Name of DejaVu font"> - <file load_collection="true" font_hinting="default"> - Inter_18pt-Regular.ttf - </file> + <file>DejaVuSans.ttf</file> </font> <font name="DejaVu" comment="Name of DejaVu font (bold)" font_style="BOLD"> - <file load_collection="true" font_hinting="force_auto" flags="bold"> - Inter_18pt-SemiBold.ttf + <file> + DejaVuSans-Bold.ttf </file> </font> <font name="DejaVu" comment="Name of DejaVu font (italic)" font_style="ITALIC"> - <file load_collection="true"> - Inter_18pt-Italic.ttf + <file> + DejaVuSans-Oblique.ttf </file> </font> <font name="DejaVu" comment="Name of DejaVu font (bold italic)" font_style="BOLD|ITALIC"> - <file load_collection="true" font_hinting="default" flags="bold"> - Inter_18pt-SemiBoldItalic.ttf + <file> + DejaVuSans-BoldOblique.ttf </file> </font> <font name="Helvetica" comment="Name of Helvetica font"> - <file load_collection="true" font_hinting="default"> - Inter_18pt-Regular.ttf - </file> + <file load_collection="true" font_weight="400">Inter-VariableFont_opsz,wght.ttf</file> <os name="Windows"> <file> arial.ttf @@ -179,9 +163,7 @@ </os> </font> <font name="Helvetica" comment="Name of Helvetica font (bold)" font_style="BOLD"> - <file load_collection="true" font_hinting="default" flags="bold"> - Inter_18pt-SemiBold.ttf - </file> + <file load_collection="true" font_weight="800" flags="bold">Inter-VariableFont_opsz,wght.ttf</file> <os name="Windows"> <file> arialbd.ttf @@ -194,9 +176,7 @@ </os> </font> <font name="Helvetica" comment="Name of Helvetica font (italic)" font_style="ITALIC"> - <file load_collection="true"> - Inter_18pt-Italic.ttf - </file> + <file load_collection="true" font_weight="400">Inter-Italic-VariableFont_opsz,wght.ttf</file> <os name="Windows"> <file> ariali.ttf @@ -209,9 +189,7 @@ </os> </font> <font name="Helvetica" comment="Name of Helvetica font (bold italic)" font_style="BOLD|ITALIC"> - <file load_collection="true" font_hinting="default" flags="bold"> - Inter_18pt-SemiBoldItalic.ttf - </file> + <file load_collection="true" flags="bold" font_weight="800">Inter-Italic-VariableFont_opsz,wght.ttf</file> <os name="Windows"> <file> arialbi.ttf @@ -227,9 +205,7 @@ <file> times.ttf </file> - <file load_collection="true" font_hinting="default"> - Inter_18pt-Regular.ttf - </file> + <file font_weight="400">Inter-VariableFont_opsz,wght.ttf</file> </font> <font_size name="Monospace" comment="Size for monospaced font (points, or 1/72 of an inch)" size="8.0"/> <font_size name="Huge" comment="Size of huge font (points, or 1/72 of an inch)" size="16.0"/> |
