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

[core] Double maximum label width by reducing glyph precision. #11508

Merged
merged 1 commit into from
Mar 22, 2018

Conversation

ChrisLoer
Copy link
Contributor

@ChrisLoer ChrisLoer commented Mar 22, 2018

Copy link
Contributor

@mollymerp mollymerp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!! just one double-check question/comment 😸

static_cast<int16_t>(::round(o.x * 64)), // use 1/64 pixels for placement
static_cast<int16_t>(::round((o.y + glyphOffsetY) * 64))
static_cast<int16_t>(::round(o.x * 32)), // use 1/32 pixels for placement
static_cast<int16_t>(::round((o.y + glyphOffsetY) * 32))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to differ from the JS version, but it's not a new difference https://github.com/mapbox/mapbox-gl-js/pull/6375/files#diff-c3312919f069eefcab838ca0389b355aR108 – I think what's happening is you add the offset before oy is passed to the js addVertex function so they are in fact the same, but just flagging to making sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl text rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants