2023-08-07 19:35:18 +00:00
committed by Git OBS Bridge
parent 0990ca2677
commit 869c2fb7b7

View File

@@ -1,21 +1,6 @@
From 187d3e94f0bd28b63c934bac84ba7c5fb7beb049 Mon Sep 17 00:00:00 2001
From: Danilo Spinella <oss@danyspin97.org>
Date: Tue, 14 Mar 2023 16:31:09 +0100
Subject: [PATCH 2/2] Revert "Require HarfBuzz 5.1.0"
This reverts commit cbdcc18778f9736ca6f186e2bbb9f0db456b1cee.
---
configure.ac | 1 -
vcl/inc/font/LogicalFontInstance.hxx | 2 ++
vcl/source/font/LogicalFontInstance.cxx | 13 ++++++++++++-
vcl/source/gdi/CommonSalLayout.cxx | 9 +++++++--
4 files changed, 21 insertions(+), 4 deletions(-)
Index: libreoffice-7.5.3.2/configure.ac
===================================================================
--- libreoffice-7.5.3.2.orig/configure.ac
+++ libreoffice-7.5.3.2/configure.ac
@@ -10848,7 +10848,7 @@ AC_SUBST(SYSTEM_LIBORCUS)
--- libreoffice-7.6.0.1/configure.ac 2023-08-07 21:28:19.740514309 +0200
+++ libreoffice-7.6.0.1/configure.ac 2023-08-07 21:28:32.847268581 +0200
@@ -10868,7 +10868,7 @@
dnl ===================================================================
dnl HarfBuzz
dnl ===================================================================
@@ -23,12 +8,10 @@ Index: libreoffice-7.5.3.2/configure.ac
+harfbuzz_required_version=0.93
GRAPHITE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/graphite/include -DGRAPHITE2_STATIC"
GRAPHITE_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite"
Index: libreoffice-7.5.3.2/vcl/inc/font/LogicalFontInstance.hxx
===================================================================
--- libreoffice-7.5.3.2.orig/vcl/inc/font/LogicalFontInstance.hxx
+++ libreoffice-7.5.3.2/vcl/inc/font/LogicalFontInstance.hxx
@@ -156,8 +156,10 @@ private:
HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src"
--- libreoffice-7.6.0.1/vcl/inc/font/LogicalFontInstance.hxx 2023-08-07 21:28:16.093823265 +0200
+++ libreoffice-7.6.0.1/vcl/inc/font/LogicalFontInstance.hxx 2023-08-07 21:28:32.847268581 +0200
@@ -156,8 +156,10 @@
// The value is initialized and used in NeedOffsetCorrection().
std::optional<FontFamilyEnum> m_xeFontFamilyEnum;
@@ -39,11 +22,9 @@ Index: libreoffice-7.5.3.2/vcl/inc/font/LogicalFontInstance.hxx
};
inline hb_font_t* LogicalFontInstance::GetHbFont()
Index: libreoffice-7.5.3.2/vcl/source/font/LogicalFontInstance.cxx
===================================================================
--- libreoffice-7.5.3.2.orig/vcl/source/font/LogicalFontInstance.cxx
+++ libreoffice-7.5.3.2/vcl/source/font/LogicalFontInstance.cxx
@@ -54,8 +54,10 @@ LogicalFontInstance::~LogicalFontInstanc
--- libreoffice-7.6.0.1/vcl/source/font/LogicalFontInstance.cxx 2023-08-07 21:28:15.910488707 +0200
+++ libreoffice-7.6.0.1/vcl/source/font/LogicalFontInstance.cxx 2023-08-07 21:31:44.758551351 +0200
@@ -54,8 +54,10 @@
if (m_pHbFontUntransformed)
hb_font_destroy(m_pHbFontUntransformed);
@@ -54,7 +35,7 @@ Index: libreoffice-7.5.3.2/vcl/source/font/LogicalFontInstance.cxx
}
hb_font_t* LogicalFontInstance::InitHbFont()
@@ -73,10 +75,12 @@ hb_font_t* LogicalFontInstance::InitHbFo
@@ -73,10 +75,12 @@
if (!aVariations.empty())
hb_font_set_variations(pHbFont, aVariations.data(), aVariations.size());
@@ -67,7 +48,7 @@ Index: libreoffice-7.5.3.2/vcl/source/font/LogicalFontInstance.cxx
ImplInitHbFont(pHbFont);
@@ -87,6 +91,7 @@ hb_font_t* LogicalFontInstance::GetHbFon
@@ -87,6 +91,7 @@
{
auto* pHbFont = const_cast<LogicalFontInstance*>(this)->GetHbFont();
@@ -75,7 +56,7 @@ Index: libreoffice-7.5.3.2/vcl/source/font/LogicalFontInstance.cxx
if (NeedsArtificialItalic()) // || NeedsArtificialBold()
{
if (!m_pHbFontUntransformed)
@@ -98,7 +103,7 @@ hb_font_t* LogicalFontInstance::GetHbFon
@@ -98,7 +103,7 @@
}
return m_pHbFontUntransformed;
}
@@ -84,7 +65,7 @@ Index: libreoffice-7.5.3.2/vcl/source/font/LogicalFontInstance.cxx
return pHbFont;
}
@@ -254,6 +259,7 @@ bool LogicalFontInstance::NeedsArtificia
@@ -254,6 +259,7 @@
return m_aFontSelData.GetItalic() != ITALIC_NONE && m_pFontFace->GetItalic() == ITALIC_NONE;
}
@@ -92,34 +73,36 @@ Index: libreoffice-7.5.3.2/vcl/source/font/LogicalFontInstance.cxx
namespace
{
void move_to_func(hb_draw_funcs_t*, void* /*pDrawData*/, hb_draw_state_t*, float to_x, float to_y,
@@ -288,10 +294,12 @@ void close_path_func(hb_draw_funcs_t*, v
@@ -288,9 +294,12 @@
pPoly->clear();
}
}
+#endif
bool LogicalFontInstance::GetGlyphOutlineUntransformed(sal_GlyphId nGlyph,
basegfx::B2DPolyPolygon& rPolyPoly) const
basegfx::B2DPolyPolygon LogicalFontInstance::GetGlyphOutlineUntransformed(sal_GlyphId nGlyph) const
{
+ basegfx::B2DPolyPolygon aPolyPoly;
+#if HB_VERSION_ATLEAST(4, 0, 0)
if (!m_pHbDrawFuncs)
{
m_pHbDrawFuncs = hb_draw_funcs_create();
@@ -312,6 +320,9 @@ bool LogicalFontInstance::GetGlyphOutlin
hb_font_get_glyph_shape(GetHbFontUntransformed(), nGlyph, m_pHbDrawFuncs, &rPolyPoly);
@@ -305,12 +314,12 @@
hb_draw_funcs_set_close_path_func(m_pHbDrawFuncs, close_path_func, pUserData, nullptr);
}
- basegfx::B2DPolyPolygon aPolyPoly;
#if HB_VERSION_ATLEAST(7, 0, 0)
hb_font_draw_glyph(GetHbFontUntransformed(), nGlyph, m_pHbDrawFuncs, &aPolyPoly);
#else
hb_font_get_glyph_shape(GetHbFontUntransformed(), nGlyph, m_pHbDrawFuncs, &aPolyPoly);
#endif
return true;
+#else
+ return false;
+#endif
return aPolyPoly;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Index: libreoffice-7.5.3.2/vcl/source/gdi/CommonSalLayout.cxx
===================================================================
--- libreoffice-7.5.3.2.orig/vcl/source/gdi/CommonSalLayout.cxx
+++ libreoffice-7.5.3.2/vcl/source/gdi/CommonSalLayout.cxx
@@ -421,10 +421,10 @@ bool GenericSalLayout::LayoutText(vcl::t
--- libreoffice-7.6.0.1/vcl/source/gdi/CommonSalLayout.cxx 2023-08-07 21:28:15.910488707 +0200
+++ libreoffice-7.6.0.1/vcl/source/gdi/CommonSalLayout.cxx 2023-08-07 21:28:32.850601937 +0200
@@ -421,10 +421,10 @@
const int nRunLen = nEndRunPos - nMinRunPos;
int nHbFlags = HB_BUFFER_FLAGS_DEFAULT;
@@ -132,7 +115,7 @@ Index: libreoffice-7.5.3.2/vcl/source/gdi/CommonSalLayout.cxx
if (nMinRunPos == 0)
nHbFlags |= HB_BUFFER_FLAG_BOT; /* Beginning-of-text */
if (nEndRunPos == nLength)
@@ -545,8 +545,13 @@ bool GenericSalLayout::LayoutText(vcl::t
@@ -545,8 +545,13 @@
if (hb_glyph_info_get_glyph_flags(&pHbGlyphInfos[i]) & HB_GLYPH_FLAG_UNSAFE_TO_BREAK)
nGlyphFlags |= GlyphItemFlags::IS_UNSAFE_TO_BREAK;