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

PIXI.Texture: extra space added while the wordWrap is enabled for my text. #4251

Closed
jcyuan opened this issue Aug 24, 2017 · 1 comment
Closed

Comments

@jcyuan
Copy link
Contributor

jcyuan commented Aug 24, 2017

in TextMetrics.wordWrap method, it process my text into few lines, but somehow it adds extra useless blank to the head of the line, see the pics below:

this is my original text: 缩放支持三种模式:直接\n缩\n放/九宫格/平铺。在库里右击图片,然后点击菜单中的编辑,可以打开图片属性
http://jc-space.com/originalText.jpg

and this is the lines processed by TextMetrics.wordWrap:
http://jc-space.com/processedLines.jpg
as you can see, there are useless blank ahead of the lines

and this is the finaly result rendered which is incorrect:
http://jc-space.com/finalResult.jpg

jcyuan added a commit to jcyuan/pixi.js that referenced this issue Nov 10, 2017
original code is in a wrong way to add blank character when the style.breakWords is enabled.
jcyuan added a commit to jcyuan/FairyGUI-PixiJS that referenced this issue Nov 10, 2017
1, text align does not work while it's being moving.
2, TextMetrics.wordWrap from official code adds extra useless blank to the head of the first text line, see issue: pixijs/pixijs#4251, and this is the hot fix for it. I've pushed this patch to the official Guithub as a pull-request already, once they merge it, I'll clear my code again.
fix bug for GTextInput.ts
1, text align does not work.
@lock
Copy link

lock bot commented Feb 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants