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

IText Glitches post 1.5.0 release #2109

Closed
gregtap opened this issue Apr 15, 2015 · 5 comments · Fixed by #2183
Closed

IText Glitches post 1.5.0 release #2109

gregtap opened this issue Apr 15, 2015 · 5 comments · Fixed by #2183
Assignees
Milestone

Comments

@gregtap
Copy link
Contributor

gregtap commented Apr 15, 2015

image
image
image

From http://fabricjs.com/test/misc/itext.html.

The [a] which appears as a non capital char should have been capitalized. The whole list of styles seems to be off by one.

The same happens when selecting and replacing the content with a new character, the styles of preexisting chars is not kept and every styles get shifted.

@asturur asturur self-assigned this Apr 15, 2015
@asturur
Copy link
Member

asturur commented Apr 15, 2015

I add it in the iText fixings for 1.5.0.1
With style problem when justify, space problem when justify.
In this case i think that just newlines are counted while shifting style

@asturur
Copy link
Member

asturur commented Apr 15, 2015

From http://fabricjs.com/test/misc/itext.html
image

An animation from my custom fork.
image

As soon as a new char is entered the bounding box is properly calculated. I tried to call setCoord and calcOffset without success.

@asturur
Copy link
Member

asturur commented Apr 15, 2015

I think that internal style change does not trigger a cache clearing.

@asturur asturur changed the title IText multi line delete does not shift styles properly. IText Glitches post 1.5.0 release Apr 15, 2015
@gregtap
Copy link
Contributor Author

gregtap commented Apr 15, 2015

this._clearCache(); seems to be called, strange.
Memo: calling this._initDimensions(); did the trick.

@asturur
Copy link
Member

asturur commented Apr 22, 2015

i add #760

@asturur asturur added this to the 1.5.1 milestone Apr 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants