-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Implement property functions for line-join, text-justify, text-anchor #9583
Conversation
src/mbgl/text/shaping.cpp
Outdated
@@ -195,13 +195,62 @@ std::set<std::size_t> determineLineBreaks(const std::u16string& logicalInput, | |||
return leastBadBreaks(evaluateBreak(logicalInput.size(), currentX, targetWidth, potentialBreaks, 0, true)); | |||
} | |||
|
|||
struct AnchorAlignment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this struct is only used as a temporary variable on the stack, how about just inlining getAnchorAlignment
where it's used and replacing the AnchorAlignment
variable with separate horizontalAlign
and verticalAlign
variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only got a chance to look at this briefly, but looks good to me!
I added ignores for DDS line-join tests in #9612 so you'll want to un-ignore those when you rebase. |
…ne-join, text-anchor, text-justify
I also un-ignored |
I started down the path of porting mapbox/mapbox-gl-js#5020 to native, but because of the spec-based generated code figured I may as well port mapbox/mapbox-gl-js#4997 and mapbox/mapbox-gl-js#5000 here as well.
Closes #9555.
Closes #9559.
This is based on the gl-js SHA in mapbox/mapbox-gl-js#5020 — remaining TODO here is to update the sdk-support tables in gl-js for these properties.