diff --git a/doc/python/pages/changelog.rst b/doc/python/pages/changelog.rst index 1bee67d..78bb9a0 100644 --- a/doc/python/pages/changelog.rst +++ b/doc/python/pages/changelog.rst @@ -149,7 +149,7 @@ Changelog - Exposed the new :ref:`text.AbstractShaper`, :ref:`text.RendererCore`, :ref:`text.Renderer`, :ref:`text.RendererGL` classes as well as the new :ref:`text.Feature`, :ref:`text.Script` enums and the - :ref:`text.FeatureRange` helper + :ref:`text.FeatureRange` helper, plus more :ref:`text.Alignment` options - Exposed :ref:`trade.AbstractImporter.features` and :ref:`trade.AbstractImporter.flags` and corresponding enums - Exposed a basic interface of :ref:`trade.AbstractImageConverter` and diff --git a/src/python/magnum/text.cpp b/src/python/magnum/text.cpp index e039165..f9cc6e6 100644 --- a/src/python/magnum/text.cpp +++ b/src/python/magnum/text.cpp @@ -665,18 +665,61 @@ void text(py::module_& m) { py::enum_{m, "Alignment", "Text rendering alignment"} .value("LINE_LEFT", Text::Alignment::LineLeft) + .value("LINE_LEFT_GLYPH_BOUNDS", Text::Alignment::LineLeftGlyphBounds) .value("LINE_CENTER", Text::Alignment::LineCenter) + .value("LINE_CENTER_INTEGRAL", Text::Alignment::LineCenterIntegral) + .value("LINE_CENTER_GLYPH_BOUNDS", Text::Alignment::LineCenterGlyphBounds) + .value("LINE_CENTER_GLYPH_BOUNDS_INTEGRAL", Text::Alignment::LineCenterGlyphBoundsIntegral) .value("LINE_RIGHT", Text::Alignment::LineRight) + .value("LINE_RIGHT_GLYPH_BOUNDS", Text::Alignment::LineRightGlyphBounds) + .value("LINE_BEGIN", Text::Alignment::LineBegin) + .value("LINE_BEGIN_GLYPH_BOUNDS", Text::Alignment::LineBeginGlyphBounds) + .value("LINE_END", Text::Alignment::LineEnd) + .value("LINE_END_GLYPH_BOUNDS", Text::Alignment::LineEndGlyphBounds) + .value("BOTTOM_LEFT", Text::Alignment::BottomLeft) + .value("BOTTOM_LEFT_GLYPH_BOUNDS", Text::Alignment::BottomLeftGlyphBounds) + .value("BOTTOM_CENTER", Text::Alignment::BottomCenter) + .value("BOTTOM_CENTER_INTEGRAL", Text::Alignment::BottomCenterIntegral) + .value("BOTTOM_CENTER_GLYPH_BOUNDS", Text::Alignment::BottomCenterGlyphBounds) + .value("BOTTOM_CENTER_GLYPH_BOUNDS_INTEGRAL", Text::Alignment::BottomCenterGlyphBoundsIntegral) + .value("BOTTOM_RIGHT", Text::Alignment::BottomRight) + .value("BOTTOM_RIGHT_GLYPH_BOUNDS", Text::Alignment::BottomRightGlyphBounds) + .value("BOTTOM_BEGIN", Text::Alignment::BottomBegin) + .value("BOTTOM_BEGIN_GLYPH_BOUNDS", Text::Alignment::BottomBeginGlyphBounds) + .value("BOTTOM_END", Text::Alignment::BottomEnd) + .value("BOTTOM_END_GLYPH_BOUNDS", Text::Alignment::BottomEndGlyphBounds) .value("MIDDLE_LEFT", Text::Alignment::MiddleLeft) + .value("MIDDLE_LEFT_INTEGRAL", Text::Alignment::MiddleLeftIntegral) + .value("MIDDLE_LEFT_GLYPH_BOUNDS", Text::Alignment::MiddleLeftGlyphBounds) + .value("MIDDLE_LEFT_GLYPH_BOUNDS_INTEGRAL", Text::Alignment::MiddleLeftGlyphBoundsIntegral) .value("MIDDLE_CENTER", Text::Alignment::MiddleCenter) + .value("MIDDLE_CENTER_INTEGRAL", Text::Alignment::MiddleCenterIntegral) + .value("MIDDLE_CENTER_GLYPH_BOUNDS", Text::Alignment::MiddleCenterGlyphBounds) + .value("MIDDLE_CENTER_GLYPH_BOUNDS_INTEGRAL", Text::Alignment::MiddleCenterGlyphBoundsIntegral) .value("MIDDLE_RIGHT", Text::Alignment::MiddleRight) + .value("MIDDLE_RIGHT_INTEGRAL", Text::Alignment::MiddleRightIntegral) + .value("MIDDLE_RIGHT_GLYPH_BOUNDS", Text::Alignment::MiddleRightGlyphBounds) + .value("MIDDLE_RIGHT_GLYPH_BOUNDS_INTEGRAL", Text::Alignment::MiddleRightGlyphBoundsIntegral) + .value("MIDDLE_BEGIN", Text::Alignment::MiddleBegin) + .value("MIDDLE_BEGIN_INTEGRAL", Text::Alignment::MiddleBeginIntegral) + .value("MIDDLE_BEGIN_GLYPH_BOUNDS", Text::Alignment::MiddleBeginGlyphBounds) + .value("MIDDLE_BEGIN_GLYPH_BOUNDS_INTEGRAL", Text::Alignment::MiddleBeginGlyphBoundsIntegral) + .value("MIDDLE_END", Text::Alignment::MiddleEnd) + .value("MIDDLE_END_INTEGRAL", Text::Alignment::MiddleEndIntegral) + .value("MIDDLE_END_GLYPH_BOUNDS", Text::Alignment::MiddleEndGlyphBounds) + .value("MIDDLE_END_GLYPH_BOUNDS_INTEGRAL", Text::Alignment::MiddleEndGlyphBoundsIntegral) .value("TOP_LEFT", Text::Alignment::TopLeft) + .value("TOP_LEFT_GLYPH_BOUNDS", Text::Alignment::TopLeftGlyphBounds) .value("TOP_CENTER", Text::Alignment::TopCenter) + .value("TOP_CENTER_INTEGRAL", Text::Alignment::TopCenterIntegral) + .value("TOP_CENTER_GLYPH_BOUNDS", Text::Alignment::TopCenterGlyphBounds) + .value("TOP_CENTER_GLYPH_BOUNDS_INTEGRAL", Text::Alignment::TopCenterGlyphBoundsIntegral) .value("TOP_RIGHT", Text::Alignment::TopRight) - .value("LINE_CENTER_INTEGRAL", Text::Alignment::LineCenterIntegral) - .value("MIDDLE_LEFT_INTEGRAL", Text::Alignment::MiddleLeftIntegral) - .value("MIDDLE_CENTER_INTEGRAL", Text::Alignment::MiddleCenterIntegral) - .value("MIDDLE_RIGHT_INTEGRAL", Text::Alignment::MiddleRightIntegral); + .value("TOP_RIGHT_GLYPH_BOUNDS", Text::Alignment::TopRightGlyphBounds) + .value("TOP_BEGIN", Text::Alignment::TopBegin) + .value("TOP_BEGIN_GLYPH_BOUNDS", Text::Alignment::TopBeginGlyphBounds) + .value("TOP_END", Text::Alignment::TopEnd) + .value("TOP_END_GLYPH_BOUNDS", Text::Alignment::TopEndGlyphBounds); /* RendererCore, Renderer, RendererGL */ py::class_{m, "RendererCore", "Text renderer core"}