GithubHelp home page GithubHelp logo

Line height about pixi-multistyle-text HOT 9 CLOSED

tleunen avatar tleunen commented on August 23, 2024 2
Line height

from pixi-multistyle-text.

Comments (9)

bluepichu avatar bluepichu commented on August 23, 2024

So there's supposed to be a lineHeight property that you can add to any text style, but it doesn't seem to actually be applied anywhere in our code.

Actually, that style doesn't seem to be used anywhere in PIXI.Text either, even though it's listed in the documentation...

Implementing this shouldn't be too bad, though I'll have to think about how it plays with multiple font sizes and vertical alignments. (I'll probably just look into what CSS does and follow that as a guide.)

from pixi-multistyle-text.

bluepichu avatar bluepichu commented on August 23, 2024

...though we'll also need to decide which units to use. I'd personally probably opt for a multiplier on the font size (CSS's unitless option), though interpreting it as a number of pixels (like CSS's length option) is also a reasonable choice.

from pixi-multistyle-text.

nmiguelmoura avatar nmiguelmoura commented on August 23, 2024

Hi,
Thank you.
I understand that, but in PIXI.Text, lineHeight works just fine.
The only thing for now that is preventing me from using MultiText for all my text fields in PIXI is this lineHeight property. Once its working, i'll make it my default text in my apps, because its great and solves me a lot of problems.
Congrats,
Nuno

from pixi-multistyle-text.

bluepichu avatar bluepichu commented on August 23, 2024

Ah - apologies. I think I accidentally tested with a crazy-out-of-date copy of Pixi.

Looks like base Pixi uses the equivalent of CSS's length option, so we should stay consistent with that. That shouldn't be too hard to fold in; I'll try to include that with the new vertical align options.

from pixi-multistyle-text.

kuoruan avatar kuoruan commented on August 23, 2024

lineHeight still not work. 😢

from pixi-multistyle-text.

bluepichu avatar bluepichu commented on August 23, 2024

lineHeight does not work

from pixi-multistyle-text.

EloB avatar EloB commented on August 23, 2024

I tried to solve lineHeight and it worked for me but I'm not sure about vertical align. I don't use that. Can someone test it?

#71

from pixi-multistyle-text.

tleunen avatar tleunen commented on August 23, 2024

@bluepichu - Would you have time to check out the suggested PR #71 ?

from pixi-multistyle-text.

andrew-ntk avatar andrew-ntk commented on August 23, 2024

Will this bug be fixed in the near future?

from pixi-multistyle-text.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.