SVGTextLayoutEngineBaseline.h [plain text]
#pragma once
#include "SVGRenderStyleDefs.h"
#include <wtf/Noncopyable.h>
namespace WebCore {
class FontCascade;
class RenderObject;
class SVGElement;
class SVGRenderStyle;
class SVGTextMetrics;
class SVGTextLayoutEngineBaseline {
WTF_MAKE_NONCOPYABLE(SVGTextLayoutEngineBaseline);
public:
SVGTextLayoutEngineBaseline(const FontCascade&);
float calculateBaselineShift(const SVGRenderStyle&, SVGElement* context) const;
float calculateAlignmentBaselineShift(bool isVerticalText, const RenderObject& textRenderer) const;
float calculateGlyphOrientationAngle(bool isVerticalText, const SVGRenderStyle&, const UChar& character) const;
float calculateGlyphAdvanceAndOrientation(bool isVerticalText, SVGTextMetrics&, float angle, float& xOrientationShift, float& yOrientationShift) const;
private:
EAlignmentBaseline dominantBaselineToAlignmentBaseline(bool isVerticalText, const RenderObject* textRenderer) const;
const FontCascade& m_font;
};
}