惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】
爱范儿
爱范儿
博客园 - 聂微东
美团技术团队
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
云风的 BLOG
云风的 BLOG
罗磊的独立博客
V
Visual Studio Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
V
V2EX
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

Martin Owens activity

Martin Owens deleted project branch average-color-divide at Inkscape / inkscape Fix divide-by-zero crash when using calligraphy tool (!7923) · Merge requests · Inkscape / inkscape · GitLab Add selection file to bypass Windows command length limits (correction) (865df7a5) · Commits · Inkscape / inkscape · GitLab Draft: Fix AppImage crashing during save on older distros (!7922) · Merge requests · Inkscape / inkscape · GitLab e71fa7f8e0858aab87b7fc0814a30a8c88da9b43 to fe225a6b9e1042c7221d95173be22a02b3725337 · Martin Owens / inkscape · GitLab 403 Forbidden on Inkscape web server (#693) · Issues · Inkscape / inkscape-web · GitLab 403 Forbidden on Inkscape web server (#13509) · Issues · Inkscape / Inbox · GitLab Add selection file to bypass Windows command length limits (correction) (!7917) · 合并请求 · Inkscape / inkscape · GitLab Non-vertical axonometric axis implementation (!7912) · Merge requests · Inkscape / inkscape · GitLab Update split mode on tab switch (!7915) · Merge requests · Inkscape / inkscape · GitLab inset/offset as app functions so they can be used from CLI (!7914) · Merge requests · Inkscape / inkscape · GitLab Performace regresion in last month (#5879) · Issues · Inkscape / inkscape · GitLab [Regression] Right-aligned text has a new gap in 1.4.4 (#6130) · Issues · Inkscape / inkscape · GitLab [Regression] Right-aligned text has a new gap in 1.4.4 (#13498) · Issues · Inkscape / Inbox · GitLab c503804e014994d611de1b225bee8158c06448a8 to a4588d8ead1e7049b90c5a126962746ed286ab17 · Inkscape / inkscape-web · GitLab Validate the extensions of signature file uploads (a4588d8e) · 提交 · Inkscape / inkscape-web · GitLab Allow color conversions using static arrays instead of just vectors (e71fa7f8) · 提交 · Martin Owens / inkscape · GitLab Speed up ungroup on thousands of items (!7908) · Merge requests · Inkscape / inkscape · GitLab Incorrect handling of FontMatrix and transformation matrices with internal PDF import (#4845) · Issues · Inkscape / inkscape · GitLab Handling edge case of negative fonts in PDF (59040229) · 提交 · Inkscape / inkscape · GitLab Handling edge case of negative fonts in PDF (!7911) · 合并请求 · Inkscape / inkscape · GitLab Allow color conversions using static arrays instead of just vectors (33e65d1b) · Commits · Martin Owens / inkscape · GitLab Allow color conversions using static arrays instead of just vectors (9be5f867) · Commits · Martin Owens / inkscape · GitLab a9672ea1dff483b5b3aa8c6b5d88cd223001bef5 to 512a5e57602ac52e1d35782a7dcebae04262b2b8 · Martin Owens / inkscape · GitLab Add selection file to bypass Windows command length limits (!7905) · 合并请求 · Inkscape / inkscape · GitLab Revert Pango label changes (1.4.x) (!7907) · 合并请求 · Inkscape / inkscape · GitLab Crash on selecting a `<text>` object without a `<tspan>` inside (#5462) · Issues · Inkscape / inkscape · GitLab Fix breakage with Ubuntu 26.04 CI (!7904) · 合并请求 · Inkscape / inkscape · GitLab c673fdd5148253276826d4eda3951daaefb82607 to 356b31383ba324396a225686613236484305533d · Martin Owens / inkscape · GitLab Revert Text tool cursor changes (1.4.x) (!7903) · 合并请求 · Inkscape / inkscape · GitLab
Font handling improvements, centered mostly around variab...
Martin Owens · 2026-05-30 · via Martin Owens activity

Font handling improvements, centered mostly around variable fonts.

  • Review changes

  • Download

This is a story of a rabbit hole, a very deep rabbit hole, and what happens if you jump in head first.

This started as an attempt to reduce a memory leak with variable fonts and FreeType. It ended up with major changes to how variable fonts are handled. The most user forward change is that now the names for named face instances in a variable font are displayed. Matching of named instances is now handled correctly in the GUI. In the Font tab of the Text and Font dialog, only the face name is shown. The CSS string is still available, but in the tooltip. (With variable fonts, the CSS string can be very, very long. The CSS string is actually the result of the pango_font_description_to_string() function.)

Before: Screenshot_From_2026-06-05_15-22-47 After: Screenshot_From_2026-06-05_15-24-00

This merge request does not change the toolbar style selector to use named faces. That is another rather large project.

Principle changes:

  • Switch the OpenType utilities to use exclusively HarfBuzz.

  • This removes a memory leak for font variations. The function FT_Get_MM_Var takes a ft_face as an argument but matching deletion function FT_Done_MM_Var requires ft_library which we don't have access to.

  • As a benefit of using Harfbuzz, we get the actual names of the variation axes. FreeType gives us the 'tags' in the name field except for the five predefined axes (weight, stretch, ...). This removes the need to rely on a list of tag to name pairs in font-variations.cpp, thus axis names have been removed from the data structure.

  • Font variation axes are now included in the 'font_spec' for a font instance. This allows us to track named instances of variable fonts and include them in the Face (style) list.

  • Switched from <map> to <vector> to track axes. Axes are kept in order as found in font.

  • Store the "tag" and "name" for each axis. The FreeType "name" value, formerly uses as the key in the map, was actually the "tag" value. Tags must be unique within a font. Names are arbitrary.

  • Parametric (hidden axes) now remain hidden in the GUI.

  • "CSS Style" in Text and Font dialog, Font tab, moved to tooltip. With variable fonts, the strings can be very long. (It's not true CSS. For example, CSS only defines the weight key words "normal" and "bold". The weights given in CSS Style are defined by Pango. They are commonly used by font designers but are not standardized.)

  • As CSS now allows for integer weight values from 1 through 1000, inclusive, we don't need to replace Pango's Book, Semi-Light, and Ultra-Heavy values anymore. Also removed switch statement for font weight in style-text.cpp as it's no longer useful.

  • The code was assuming that with a variation font, all style elements are set with variation axes. This is not the case. There is one font, for example, that has different files for the "Regular" and "Italic" versions.

  • Removed unused system_fontspec() from font-lister.h/cpp

  • Removed FontFactory::ConstructFontSpecification(), used only one place for debugging.

  • Moved canonize_fontspec from FontLister class to stand-alone function in font-utils.h/cpp. FontLister is tied to GTK and really should be in src/ui. This move is necessary to keep testing of libnrtype free from GTK dependencies.

  • Added tests for font-utils.h/cpp (canonize_fontspec(), parse_variations()).

Here is a sample of variable fonts that can be used for testing (as seen in the screenshots above). Note, that some of these also have non-variable versions.

  • Adwaita Sans
  • Amstelvar
  • Cascadia Code
  • Decover Alpha
  • Foldit
  • Nabla
  • Noto Serif CJK JP (and many but not all Noto fonts)
  • Roboto Flex
  • Rocher Color
  • Vazirmatn
Edited by Tavmjong Bah