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

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

Merged
ChrisLoer merged 1 commit into
release-bobafrom
wider-labels
Mar 22, 2018
Merged

ChrisLoer merged 1 commit into
release-bobafrom
wider-labels

Conversation

@ChrisLoer

@ChrisLoer ChrisLoer commented Mar 22, 2018 •

Copy link
Copy Markdown
Contributor

@ChrisLoer
ChrisLoer requested review from ansis and mollymerp March 22, 2018 19:20

@mollymerp mollymerp left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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