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.
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/
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.
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.
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.
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.
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.
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.
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.
The non-UI part is done, the UI is tracked in bug 152206.
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.
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.
Created attachment 206559 [details] Exported PDF