diff --git a/Source/WebCore/platform/graphics/GlyphBufferMembers.h b/Source/WebCore/platform/graphics/GlyphBufferMembers.h
index 9723d1cf2584..a2b254d7eb15 100644
a
|
b
|
using GlyphBufferAdvance = CGSize;
|
49 | 49 | using GlyphBufferOrigin = CGPoint; |
50 | 50 | using GlyphBufferStringOffset = CFIndex; |
51 | 51 | #else |
| 52 | #if USE(HAIKU) |
| 53 | // The Haiku port uses unicode codepoints as glyphs directly, and need a 32bit |
| 54 | // type to store them |
| 55 | using GlyphBufferGlyph = uint32_t; |
| 56 | #else |
52 | 57 | using GlyphBufferGlyph = Glyph; |
| 58 | #endif |
53 | 59 | using GlyphBufferAdvance = FloatSize; |
54 | 60 | using GlyphBufferOrigin = FloatPoint; |
55 | 61 | using GlyphBufferStringOffset = unsigned; |
diff --git a/Source/WebCore/rendering/mathml/MathOperator.cpp b/Source/WebCore/rendering/mathml/MathOperator.cpp
index 1d287766621e..0b746265735f 100644
a
|
b
|
LayoutRect MathOperator::paintGlyph(const RenderStyle& style, PaintInfo& info, c
|
526 | 526 | |
527 | 527 | // FIXME: If we're just drawing a single glyph, why do we need to compute an advance? |
528 | 528 | auto advance = makeGlyphBufferAdvance(advanceWidthForGlyph(data)); |
529 | | info.context().drawGlyphs(*data.font, &data.glyph, &advance, 1, origin, style.fontCascade().fontDescription().fontSmoothing()); |
| 529 | info.context().drawGlyphs(*data.font, (GlyphBufferGlyph*)&data.glyph, &advance, 1, origin, style.fontCascade().fontDescription().fontSmoothing()); |
530 | 530 | |
531 | 531 | return glyphPaintRect; |
532 | 532 | } |
… |
… |
void MathOperator::paint(const RenderStyle& style, PaintInfo& info, const Layout
|
733 | 733 | LayoutPoint operatorOrigin { operatorTopLeft.x(), LayoutUnit(operatorTopLeft.y() - glyphBounds.y()) }; |
734 | 734 | // FIXME: If we're just drawing a single glyph, why do we need to compute an advance? |
735 | 735 | auto advance = makeGlyphBufferAdvance(advanceWidthForGlyph(glyphData)); |
736 | | paintInfo.context().drawGlyphs(*glyphData.font, &glyphData.glyph, &advance, 1, operatorOrigin, style.fontCascade().fontDescription().fontSmoothing()); |
| 736 | paintInfo.context().drawGlyphs(*glyphData.font, (GlyphBufferGlyph*)&glyphData.glyph, &advance, 1, operatorOrigin, style.fontCascade().fontDescription().fontSmoothing()); |
737 | 737 | } |
738 | 738 | |
739 | 739 | } |
diff --git a/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp b/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp
index 7cc9b7d41624..4351d077c5e8 100644
a
|
b
|
void RenderMathMLToken::paint(PaintInfo& info, const LayoutPoint& paintOffset)
|
609 | 609 | LayoutUnit glyphAscent = static_cast<int>(lroundf(-mathVariantGlyph.font->boundsForGlyph(mathVariantGlyph.glyph).y())); |
610 | 610 | // FIXME: If we're just drawing a single glyph, why do we need to compute an advance? |
611 | 611 | auto advance = makeGlyphBufferAdvance(mathVariantGlyph.font->widthForGlyph(mathVariantGlyph.glyph)); |
612 | | info.context().drawGlyphs(*mathVariantGlyph.font, &mathVariantGlyph.glyph, &advance, 1, paintOffset + location() + LayoutPoint(0_lu, glyphAscent), style().fontCascade().fontDescription().fontSmoothing()); |
| 612 | info.context().drawGlyphs(*mathVariantGlyph.font, (GlyphBufferGlyph*)&mathVariantGlyph.glyph, &advance, 1, paintOffset + location() + LayoutPoint(0_lu, glyphAscent), style().fontCascade().fontDescription().fontSmoothing()); |
613 | 613 | } |
614 | 614 | |
615 | 615 | void RenderMathMLToken::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect) |