Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed yOffset not being used to change y position of text #3886

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Pluto8195
Copy link

@Pluto8195 Pluto8195 commented Nov 29, 2018

addresses issue mentioned in #3762

simply included (+ data.yOffset) to mesh position of text
mesh.position.y = y * textScale + data.yOffset;

@ngokevin
Copy link
Member

Hm, seems it's used at

function loadFont (src, yOffset) {
in a different way.

@Pluto8195
Copy link
Author

I see, is there something wrong with that then? since changing the yOffset has no effect.

@Pluto8195
Copy link
Author

@ngokevin can you explain what the yOffset value is suppose to effect?

@ngokevin
Copy link
Member

ngokevin commented Dec 4, 2018

Supposed to effect per-char offset but this solution might be able to replace it. I have to dig down to why the original offset logic was meant for.

@Pluto8195
Copy link
Author

comment above schema
// yOffset to adjust generated fonts from tools that may have incorrect metrics.

but I find that being able to just manipulate the y makes formatting text generally much easier

@ngokevin
Copy link
Member

Thanks for waiting.

Can you figure out what effect it has on these lines?

if (src.indexOf('/Roboto-msdf.json') >= 0) { yOffset = 30; }
... Does the yOffset stack? Is the Roboto font hack necessary any more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants