Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Source/WebCore/platform/graphics/ComplexTextController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
#include <CoreText/CoreText.h>
#endif

static void debugComplexText()
{
if (strcmp(getenv("HAIKUWEBKIT_COMPLEX_TEXT"), "DEBUGGER") == 0)
debugger("Complex text path triggered");
}

namespace WebCore {

WTF_MAKE_TZONE_ALLOCATED_IMPL(ComplexTextController);
Expand Down Expand Up @@ -125,6 +131,8 @@ ComplexTextController::ComplexTextController(const FontCascade& font, const Text
, m_forTextEmphasis(forTextEmphasis)
, m_textSpacingState(run.textSpacingState())
{
debugComplexText();

computeExpansionOpportunity();

collectComplexTextRuns();
Expand All @@ -138,6 +146,8 @@ ComplexTextController::ComplexTextController(const FontCascade& font, const Text
, m_end(run.length())
, m_expansion(run.expansion())
{
debugComplexText();

computeExpansionOpportunity();

for (auto& run : runs)
Expand All @@ -151,6 +161,7 @@ ComplexTextController::ComplexTextController(const TextRun& run, const FontCasca
, m_run(run)
, m_end(run.length())
{
debugComplexText();
}

std::pair<float, float> ComplexTextController::enclosingGlyphBoundsForTextRun(const FontCascade& fontCascade, const TextRun& textRun)
Expand Down
3 changes: 3 additions & 0 deletions Source/WebCore/platform/graphics/FontCascade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,9 @@ FontCascade::CodePath FontCascade::codePath(const TextRun& run, std::optional<un

FontCascade::CodePath FontCascade::characterRangeCodePath(std::span<const UChar> span)
{
#if PLATFORM(HAIKU)
return CodePath::Simple;
#endif
// FIXME: Should use a UnicodeSet in ports where ICU is used. Note that we
// can't simply use UnicodeCharacter Property/class because some characters
// are not 'combining', but still need to go to the complex path.
Expand Down
5 changes: 5 additions & 0 deletions Source/WebCore/platform/graphics/FontCascade.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,13 @@ class FontCascade final : public CanMakeWeakPtr<FontCascade>, public CanMakeChec
bool isFixedPitch() const;
bool canTakeFixedPitchFastContentMeasuring() const;

#if PLATFORM(HAIKU)
bool enableKerning() const { return false; }
bool requiresShaping() const { return false; }
#else
bool enableKerning() const { return m_enableKerning; }
bool requiresShaping() const { return m_requiresShaping; }
#endif

const AtomString& firstFamily() const { return m_fontDescription.firstFamily(); }
unsigned familyCount() const { return m_fontDescription.familyCount(); }
Expand Down