Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Handle zero text size #16080

Merged
merged 1 commit into from
Dec 19, 2019
Merged

Conversation

pozdnyakov
Copy link
Contributor

@pozdnyakov pozdnyakov commented Dec 19, 2019

The style specification stipulates that text-size values must be positive
(https://docs.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-text-size).

However, a zero value could be passed to the engine (e.g. as a result of
an expression). This PR handles it and thus avoids an assertion hit in shaping.cpp.

The render test : mapbox/mapbox-gl-js#9133

Fixes https://github.com/mapbox/mapbox-gl-native-team/issues/129

The style specification stipulates that `text-size` values must be positive
(https://docs.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-text-size).

However, a zero value could be passed to the engine (e.g. as a result of
an expression) this patch handles it and avoids assertion hit in `shaping.cpp`.
@pozdnyakov pozdnyakov added bug crash Core The cross-platform C++ core, aka mbgl labels Dec 19, 2019
@pozdnyakov pozdnyakov self-assigned this Dec 19, 2019
@pozdnyakov pozdnyakov merged commit cc684df into master Dec 19, 2019
@pozdnyakov pozdnyakov deleted the mikhail_handle_zero_text_size branch December 19, 2019 16:09
@tobrun tobrun mentioned this pull request Dec 19, 2019
jmkiley added a commit to mapbox/mapbox-gl-native-ios that referenced this pull request Dec 19, 2019
jmkiley added a commit to mapbox/mapbox-gl-native-ios that referenced this pull request Dec 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants