Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Issue with Spacing on Fonts with Different sizes #11

Closed
boblete opened this issue Dec 21, 2016 · 3 comments
Closed

Issue with Spacing on Fonts with Different sizes #11

boblete opened this issue Dec 21, 2016 · 3 comments
Assignees

Comments

@boblete
Copy link

boblete commented Dec 21, 2016

Hi I'm using a combination of New Lines and word wrap - when I do this I get really odd layout. (Pixi 3.0.10)

 this.MULTI_STYLE_TEXT =  {
        default: { font: "14px proxima-nova-alt-regular", fill: "#000000",align: "left",stroke: "#FFFFFF", strokeThickness: 0  },
        h: {font: "20px proxima-nova-alt-bold" },
        h1: {font: "18px proxima-nova-alt-bold"},
        h2: {font: "14px proxima-nova-alt-bold" },
        h3: {font: "16px proxima-nova-alt-bold" },
        normal:{font: "14px proxima-nova-alt-regular" },
        p:{font: "14px proxima-nova-alt-regular" },
        br:{font: "14px proxima-nova-alt-regular" }
       
    };
this.txt = new PIXI.MultiStyleText(cText,this.MULTI_STYLE_TEXT,{align:"left",wordWrap: true, wordWrapWidth:520 } );

screen shot 2016-12-21 at 16 29 54

@bluepichu bluepichu added the Bug label Dec 21, 2016
@bluepichu bluepichu self-assigned this Dec 21, 2016
@bluepichu
Copy link
Collaborator

Interesting - I'll try to take a look later today.

@bluepichu
Copy link
Collaborator

The bug is that each line's Y position seems to assume that all previous lines had the same height that it did. A fix will be coming shortly.

bluepichu added a commit to bluepichu/pixi-multistyle-text that referenced this issue Dec 27, 2016
@bluepichu
Copy link
Collaborator

See 63b946e for the fixed version. This fix is dependent on #14, so it can't be merged in until that gets resolved.

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

No branches or pull requests

2 participants