download.lst                                                  |    4 +--
 drawinglayer/source/primitive2d/textbreakuphelper.cxx         |    4 ++-
 drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx  |    4 ++-
 drawinglayer/source/primitive2d/textprimitive2d.cxx           |    3 +-
 drawinglayer/source/processor2d/vclprocessor2d.cxx            |    2 +
 drawinglayer/source/tools/emfphelperdata.cxx                  |    2 +
 drawinglayer/source/tools/wmfemfhelper.cxx                    |    5 +++-
 editeng/source/editeng/StripPortionsHelper.cxx                |    4 ++-
 external/harfbuzz/ExternalProject_harfbuzz.mk                 |    3 ++
 external/harfbuzz/UnpackedTarball_harfbuzz.mk                 |    1 
 external/harfbuzz/thread.patch                                |   11 ----------
 include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx |    1 
 include/drawinglayer/primitive2d/textprimitive2d.hxx          |    6 ++++-
 svgio/source/svgreader/svgcharacternode.cxx                   |    1 
 14 files changed, 31 insertions(+), 20 deletions(-)

New commits:
commit 03e30c841064d4a42c08558cbd7329cd43e28479
Author:     Khaled Hosny <[email protected]>
AuthorDate: Wed Mar 4 19:01:40 2026 +0200
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Mar 24 04:23:03 2026 +0100

    harfbuzz: upgrade to 13.0.0
    
    Downloaded from 
https://github.com/harfbuzz/harfbuzz/releases/download/13.0.0/harfbuzz-13.0.0.tar.xz
    
    Drop thread.patch that is now included upstream.
    
    Change-Id: I2ae3d79f28dccc499b8c62a72d75e2f57c9b5013
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200975
    Tested-by: Jenkins
    Reviewed-by: Khaled Hosny <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202487
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/download.lst b/download.lst
index 56e1f88a8754..7ee29685c698 100644
--- a/download.lst
+++ b/download.lst
@@ -395,8 +395,8 @@ GRAPHITE_TARBALL := graphite2-minimal-1.3.14.tgz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-HARFBUZZ_SHA256SUM := 
6f6db164359a2da5a84ef826615b448b33e6306067ad829d85d5b0bf936f1bb8
-HARFBUZZ_TARBALL := harfbuzz-12.3.2.tar.xz
+HARFBUZZ_SHA256SUM := 
1626ebc763d28f4bcca1531fef42e92ca995d45f8ad90ad2ae0b5d1a567fe67a
+HARFBUZZ_TARBALL := harfbuzz-13.0.0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/harfbuzz/ExternalProject_harfbuzz.mk 
b/external/harfbuzz/ExternalProject_harfbuzz.mk
index f826c7c9a969..21304ba45a38 100644
--- a/external/harfbuzz/ExternalProject_harfbuzz.mk
+++ b/external/harfbuzz/ExternalProject_harfbuzz.mk
@@ -58,6 +58,9 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) : 
| $(call gb_Externa
                        -Dcpp_std=$(subst -std:,,$(subst -std=,,$(filter 
-std%,$(CXXFLAGS_CXX11)))) \
                        -Dtests=disabled \
                        -Dutilities=disabled \
+                       -Dsubset=enabled \
+                       -Draster=disabled \
+                       -Dvector=disabled \
                        -Dicu=enabled \
                        -Dicu_builtin=true \
                        -Dgraphite2=enabled \
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk 
b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index 61d8384e0bf0..b3b63944d0dc 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -17,7 +17,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
     external/harfbuzz/harfbuzz_visibility.patch.1 \
-    external/harfbuzz/thread.patch \
 ))
 
 # meson will replace python3 from shebang in build commands with the
diff --git a/external/harfbuzz/thread.patch b/external/harfbuzz/thread.patch
deleted file mode 100644
index f5c7e0ab2dfa..000000000000
--- a/external/harfbuzz/thread.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/meson.build
-+++ src/meson.build
-@@ -674,7 +674,7 @@
- 
- libharfbuzz_subset = library('harfbuzz-subset', hb_subset_sources,
-   include_directories: incconfig,
--  dependencies: [m_dep],
-+  dependencies: [thread_dep, m_dep],
-   link_with: [libharfbuzz],
-   cpp_args: cpp_args + extra_hb_cpp_args,
-   soversion: hb_so_version,
commit a0bd3255782e9384e891490b3c38147ed019c2ee
Author:     Khaled Hosny <[email protected]>
AuthorDate: Mon Mar 2 08:33:11 2026 +0200
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Mar 24 04:22:50 2026 +0100

    tdf#153368: Support optical size for variable fonts, part 8
    
    Channel optical sizing option through drawing layer, otherwise it
    doesn’t work in Draw/Impress.
    
    Change-Id: I96cd3177dcf816b5c1e065663d4a8c90f187704f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200765
    Tested-by: Jenkins
    Reviewed-by: Khaled Hosny <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202486
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    Tested-by: Tomaž Vajngerl <[email protected]>

diff --git a/drawinglayer/source/primitive2d/textbreakuphelper.cxx 
b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
index becb9ddf43c8..2294a9c27b12 100644
--- a/drawinglayer/source/primitive2d/textbreakuphelper.cxx
+++ b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
@@ -150,6 +150,7 @@ namespace drawinglayer::primitive2d
                         mrSource.getLetterSpacing(),
                         mrSource.getProportionalFontSize(),
                         mrSource.getEscapement(),
+                        mrSource.getOpticalSizing(),
 
                         pTextDecoratedPortionPrimitive2D->getOverlineColor(),
                         pTextDecoratedPortionPrimitive2D->getTextlineColor(),
@@ -184,7 +185,8 @@ namespace drawinglayer::primitive2d
                         COL_TRANSPARENT,
                         mrSource.getLetterSpacing(),
                         mrSource.getProportionalFontSize(),
-                        mrSource.getEscapement()));
+                        mrSource.getEscapement(),
+                        mrSource.getOpticalSizing()));
             }
         }
 
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx 
b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index 99efba569054..13478b65b36a 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -466,6 +466,7 @@ namespace drawinglayer::primitive2d
             short nLetterSpacing,
             sal_uInt8 nProportionalFontSize,
             short nEscapement,
+            bool bOpticalSizing,
 
             // local parameters
             const basegfx::BColor& rOverlineColor,
@@ -493,7 +494,8 @@ namespace drawinglayer::primitive2d
                 rFillColor,
                 nLetterSpacing,
                 nProportionalFontSize,
-                nEscapement),
+                nEscapement,
+                bOpticalSizing),
             maBufferedBrokenUpText(),
             maBufferedDecorationGeometry(),
             maOverlineColor(rOverlineColor),
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx 
b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index f30f7fa125a1..afd4e0626ed5 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -206,7 +206,7 @@ TextSimplePortionPrimitive2D::TextSimplePortionPrimitive2D(
     sal_Int32 nTextLength, std::vector<double>&& rDXArray, 
std::vector<sal_Bool>&& rKashidaArray,
     attribute::FontAttribute aFontAttribute, css::lang::Locale aLocale,
     const basegfx::BColor& rFontColor, const Color& rTextFillColor, short 
nLetterSpacing,
-    sal_uInt8 nProportionalFontSize, short nEscapement)
+    sal_uInt8 nProportionalFontSize, short nEscapement, bool bOpticalSizing)
     : maTextTransform(std::move(rNewTransform))
     , maText(std::move(rText))
     , mnTextPosition(nTextPosition)
@@ -220,6 +220,7 @@ TextSimplePortionPrimitive2D::TextSimplePortionPrimitive2D(
     , mnLetterSpacing(nLetterSpacing)
     , mnProportionalFontSize(nProportionalFontSize)
     , mnEscapement(nEscapement)
+    , mbOpticalSizing(bOpticalSizing)
 {
 #if OSL_DEBUG_LEVEL > 0
     const sal_Int32 aStringLength(getText().getLength());
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 198f33efe1e7..2206a7e43b87 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -460,6 +460,8 @@ void 
VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
             // tdf#168371 set letter spacing so that VCL knows it has to 
disable ligatures
             aFont.SetFixKerning(rTextCandidate.getLetterSpacing());
 
+            aFont.SetOpticalSizing(rTextCandidate.getOpticalSizing());
+
             // tdf#152990 set the font after the MapMode is (potentially) set 
so canvas uses the desired
             // font size
             mpOutputDevice->SetFont(aFont);
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx 
b/drawinglayer/source/tools/emfphelperdata.cxx
index 841becfa30e6..9fc04c9a5042 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -1790,6 +1790,7 @@ namespace emfplushelper
                                             COL_TRANSPARENT,   // Fill Color
                                             0,
                                             100, 0,
+                                            false,
                                             color.getBColor(), // OverlineColor
                                             color.getBColor(), // TextlineColor
                                             
drawinglayer::primitive2d::TEXT_LINE_NONE,
@@ -2290,6 +2291,7 @@ namespace emfplushelper
                                                     COL_TRANSPARENT,
                                                     0,
                                                     100, 0,
+                                                    false,
                                                     color.getBColor(),
                                                     color.getBColor(),
                                                     
drawinglayer::primitive2d::TEXT_LINE_NONE,
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx 
b/drawinglayer/source/tools/wmfemfhelper.cxx
index 13a762c867f2..58ec8f74134a 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -1127,6 +1127,7 @@ namespace wmfemfhelper
                     aFillColor,
                     rFont.GetFixKerning(),
                     100, 0,
+                    rFont.GetOpticalSizing(),
 
                     // attributes for TextDecoratedPortionPrimitive2D
                     rProperty.getOverlineColorActive() ? 
rProperty.getOverlineColor() : aFontColor,
@@ -1156,7 +1157,9 @@ namespace wmfemfhelper
                     std::move(aLocale),
                     aFontColor,
                     COL_TRANSPARENT,
-                    rFont.GetFixKerning());
+                    rFont.GetFixKerning(),
+                    100, 0,
+                    rFont.GetOpticalSizing());
             }
         }
 
diff --git a/editeng/source/editeng/StripPortionsHelper.cxx 
b/editeng/source/editeng/StripPortionsHelper.cxx
index 5f8f0a4c0185..15695a5538b8 100644
--- a/editeng/source/editeng/StripPortionsHelper.cxx
+++ b/editeng/source/editeng/StripPortionsHelper.cxx
@@ -201,6 +201,7 @@ buildTextPortionPrimitive(const DrawPortionInfo& rInfo, 
const OUString& rText,
             std::move(aKashidaArray), rFontAttribute,
             rInfo.mpLocale ? *rInfo.mpLocale : css::lang::Locale(), 
aBFontColor, aTextFillColor,
             rInfo.mrFont.GetFixKerning(), rInfo.mrFont.GetPropr(), 
rInfo.mrFont.GetEscapement(),
+            rInfo.mrFont.GetOpticalSizing(),
 
             // attributes for TextDecoratedPortionPrimitive2D
             aBOverlineColor, aBUnderlineColor, eFontOverline, eFontLineStyle, 
bUnderlineAbove,
@@ -214,7 +215,8 @@ buildTextPortionPrimitive(const DrawPortionInfo& rInfo, 
const OUString& rText,
             rNewTransform, rText, rInfo.mnTextStart, rInfo.mnTextLen, 
std::vector(rDXArray),
             std::move(aKashidaArray), rFontAttribute,
             rInfo.mpLocale ? *rInfo.mpLocale : css::lang::Locale(), 
aBFontColor, aTextFillColor,
-            rInfo.mrFont.GetFixKerning(), rInfo.mrFont.GetPropr(), 
rInfo.mrFont.GetEscapement());
+            rInfo.mrFont.GetFixKerning(), rInfo.mrFont.GetPropr(), 
rInfo.mrFont.GetEscapement(),
+            rInfo.mrFont.GetOpticalSizing());
     }
 
     return pNewPrimitive;
diff --git a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx 
b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
index 7001ac4ade3e..94cb8537dfda 100644
--- a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
@@ -92,6 +92,7 @@ namespace drawinglayer::primitive2d
                 short nLetterSpacing,
                 sal_uInt8 nProportionalFontSize,
                 short nEscapement,
+                bool bOpticalSizing,
 
                 /// local parameters
                 const basegfx::BColor& rOverlineColor,
diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx 
b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index be27d0c906ff..f9315f86ce17 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -144,6 +144,9 @@ private:
     /// Escapement percentage (for superscript/subscript), 0 = normal
     sal_Int32 mnEscapement{ 0 };
 
+    /// Optical sizing
+    bool mbOpticalSizing;
+
 protected:
     /// local decomposition.
     virtual Primitive2DReference
@@ -165,7 +168,7 @@ public:
                                  const basegfx::BColor& rFontColor,
                                  const Color& rTextFillColor = COL_TRANSPARENT,
                                  short nLetterSpacing = 0, sal_uInt8 
nProportionalFontSize = 100,
-                                 short nEscapement = 0);
+                                 short nEscapement = 0, bool bOpticalSizing = 
false);
 
     /** get text outlines as polygons and their according 
ObjectTransformation. Handles all
         the necessary VCL outline extractions, scaling adaptations and other 
stuff.
@@ -187,6 +190,7 @@ public:
     short getLetterSpacing() const { return mnLetterSpacing; }
     sal_Int32 getProportionalFontSize() const { return mnProportionalFontSize; 
}
     sal_Int32 getEscapement() const { return mnEscapement; }
+    bool getOpticalSizing() const { return mbOpticalSizing; }
 
     /// helpers for determining various decoration states
     virtual bool hasTextRelief() const;
diff --git a/svgio/source/svgreader/svgcharacternode.cxx 
b/svgio/source/svgreader/svgcharacternode.cxx
index ad6655db1022..d101347877e2 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -421,6 +421,7 @@ namespace svgio::svgreader
                     COL_TRANSPARENT,
                     0,
                     100, 0,
+                    false,
 
                     // extra props for decorated
                     aDecoColor,

Reply via email to