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

推荐订阅源

Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
博客园_首页
T
Tailwind CSS Blog
美团技术团队
博客园 - 叶小钗
Microsoft Security Blog
Microsoft Security Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog

inkscape:windows_ci_14x commits

Update WIndows dependencies to r180 (995a0ec3) · Commits · René de Hesselle / inkscape · GitLab Fix Welcome dialog stacking up when run more than once (eab9c6d5) · Commits · René de Hesselle / inkscape · GitLab Edit label and tooltip for Preserve Shape setting (4c992ff3) · Commits · René de Hesselle / inkscape · GitLab Fix keyboard navigation in Objects dialog (38acd49e) · Commits · René de Hesselle / inkscape · GitLab update translations (9f8f2fec) · Commits · René de Hesselle / inkscape · GitLab Fix missing signal blocking in page toolbar (d5533a4b) · Commits · René de Hesselle / inkscape · GitLab Convert libuemf to a git submodule (22344d42) · Commits · René de Hesselle / inkscape · GitLab update translations (f5993d7c) · Commits · René de Hesselle / inkscape · GitLab update translations (fcd03438) · Commits · René de Hesselle / inkscape · GitLab Fix: request display update when removing child from group (6908c07a) · Commits · René de Hesselle / inkscape · GitLab Make po submodule shallow (90eced57) · Commits · René de Hesselle / inkscape · GitLab 1.4.3 (0d15f750) · Commits · René de Hesselle / inkscape · GitLab update translations (4d3a6d61) · Commits · René de Hesselle / inkscape · GitLab Update tutorials and man page for Inkscape 1.4.3 (excluding French) (bec26502) · Commits · René de Hesselle / inkscape · GitLab Add GioWin32-2.0.typelib to Windows (eb2146c6) · Commits · René de Hesselle / inkscape · GitLab Revert the backport of a fix causing regressions in textPath (7d1c0165) · Commits · René de Hesselle / inkscape · GitLab update translations (8a1e7745) · Commits · René de Hesselle / inkscape · GitLab Update Windows dependencies to r168 (9500139e) · Commits · René de Hesselle / inkscape · GitLab Build GraphicsMagick on Windows ourselves again (2ea69ea8) · Commits · René de Hesselle / inkscape · GitLab Prepare 1.4.3 (e2afff01) · Commits · René de Hesselle / inkscape · GitLab Update docs for 1.4.3rc (ea3d7619) · Commits · René de Hesselle / inkscape · GitLab Fix crash on MacOS when opening file by right clicking on file. (fe96d51c) · Commits · René de Hesselle / inkscape · GitLab Update macOS build pipeline to v0.82-2-g21f3e2d (56605ae7) · Commits · René de Hesselle / inkscape · GitLab Fix commands toolbar glitching at exact size (b8376295) · Commits · René de Hesselle / inkscape · GitLab Add commands toolbar to automatic toolbar policy (c37cea70) · Commits · René de Hesselle / inkscape · GitLab update translations (dfc0fde0) · Commits · René de Hesselle / inkscape · GitLab Fix welcome dialog graphics (8d76d570) · Commits · René de Hesselle / inkscape · GitLab Fix code getting items under cursor (441f5bfb) · Commits · René de Hesselle / inkscape · GitLab Make libdepixelize a submodule (09a2712d) · Commits · René de Hesselle / inkscape · GitLab Handle `xml:lang`/`lang` attribute updates (7fa5d668) · Commits · René de Hesselle / inkscape · GitLab
Set Pango context language to undetermined (bc80df21) · C...
Alvin Wong · 2025-12-03 · via inkscape:windows_ci_14x commits
Commit bc80df21 authored by alvinhochun's avatar alvinhochun Committed by Willy (Wen-Wei) Kao
Browse files

Set Pango context language to undetermined

This prevents Pango from unconditionally applying a default language to
text.

The Pango language tag is used to apply the OpenType `locl` feature,
which selects language-specific glyphs variants in some fonts. In SVG
the `xml:lang` attribute can be used to specify the language of an
element and its descendants, which Inkscape passes to Pango as the
language tag.

However, when the SVG elements does not have a language specified, the
default behaviour of Pango is to use a default language which is
determined from the current locale of the process. This is undesirable
not only because the default can be different for every users, but also
it prevents the selection of language-specific glyphs by using the font
family name alone (e.g. "Source Han Sans TC" and "Source Han Sans SC").

By setting the context language to `und` (undetermined) we can suppress
this default behaviour so that the default language-specific glyphs of
the font family are used.
Original line number Diff line number Diff line
@@ -221,6 +221,7 @@ FontFactory::FontFactory()
    : fontServer(pango_ft2_font_map_new())
    , fontContext(pango_font_map_create_context(fontServer))
{
    pango_context_set_language(fontContext, pango_language_from_string("und"));
    _font_map = Glib::wrap(fontServer);
    pango_ft2_font_map_set_resolution(PANGO_FT2_FONT_MAP(fontServer), 72, 72);
#if PANGO_VERSION_CHECK(1,48,0)