Bug 171624 - Support OpenType font variations natively
Summary: Support OpenType font variations natively
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Khaled Hosny
URL:
Whiteboard: target:26.8.0
Keywords:
Depends on:
Blocks: Font-Rendering 152206 153367 118792
  Show dependency treegraph
 
Reported: 2026-04-04 15:48 UTC by Khaled Hosny
Modified: 2026-04-09 15:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample documtent using weight and width font variation axes (36.72 KB, application/vnd.oasis.opendocument.text)
2026-04-07 08:59 UTC, Khaled Hosny
Details
Exported PDF (52.66 KB, application/pdf)
2026-04-07 09:01 UTC, Khaled Hosny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Khaled Hosny 2026-04-04 15:48:50 UTC
We currently have limited support for variable fonts via named instances that are presented to the user as individual font styles.

To fully support OpenType font variations, we need to extend ODF to allow setting arbitrary variable font settings. I suggest supporting CSS font-variation-settings (https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/font-variation-settings) and wiring this through our existing variable fonts infrastructure.

Bug 152206 tracks the UI part.
Comment 1 Volga 2026-04-05 12:16:07 UTC
This need to integrate a nice library for font rendering, and it should be capable to handle variable fonts, to make LibreOffice free from system calls. After seeing a criticize by SIL, I got this idea.

https://software.sil.org/fonts/axis-based-fonts/
Comment 2 Commit Notification 2026-04-06 15:13:17 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c6be1cb144c0f1651fff4b496bfb3e2090903625

tdf#171624: Add VCL plumbing for font variation settings

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2026-04-06 15:13:20 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/38f0fe5d169a02037ba499c7041c8cbfcd7509d0

tdf#171624: Use vcl::FontVariation instead of hb_variation_t

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2026-04-06 15:13:22 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f02741f3e64c7fe1619bad7039c7c53afe094673

tdf#171624: Add SvxFontVariationsItem and EditEngine plumbing

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2026-04-06 15:14:25 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1345ac25f62e17116b96ba0bc5847ece0968a0c0

tdf#171624: Add loext:font-variation-settings ODF attribute

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2026-04-06 15:14:27 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fdbe18bd1e596ee3e35e4608b3878e06f83febeb

tdf#171624: Wire font variation settings through Writer

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2026-04-06 15:14:30 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/07dc5877e4d2657275851ddebb41ec9ea1fc70dd

tdf#171624: HTML import/export of CSS font-variation-settings

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2026-04-06 15:14:33 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8672c952eb164f30ae9f73e87737764328ebe8c6

tdf#171624: Carry font variations through drawinglayer text primitives

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Khaled Hosny 2026-04-06 15:15:57 UTC
The non-UI part is done, the UI is tracked in bug 152206.
Comment 10 Commit Notification 2026-04-06 17:30:44 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/67447893fc8d7962bb980d5745a4ac2148d295f9

tdf#171624: Add PDF export tests for font-variation-settings

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Khaled Hosny 2026-04-07 08:59:52 UTC
Created attachment 206558 [details]
Sample documtent using weight and width font variation axes

Here is a sample document that uses Nunito Sans font (https://fonts.google.com/specimen/Nunito+Sans) and sets variation using font-variation-settings to various values, bypassing named instances entirely.
Comment 12 Khaled Hosny 2026-04-07 09:01:29 UTC
Created attachment 206559 [details]
Exported PDF