https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    02/26/2023, 10:00 PM
    this isnt an sdf one though... its a bitmap font
  • e

    early-butcher-76809

    02/26/2023, 10:00 PM
    Ah. I guess i have a SDF one, then ^^'
  • e

    early-butcher-76809

    02/26/2023, 10:00 PM
    I don't really know the difference :D
  • b

    bright-gpu-74537

    02/26/2023, 10:00 PM
    im starting to think that the various settings you use in heaps fonts are very specific to the font
  • b

    bright-gpu-74537

    02/26/2023, 10:00 PM
    can i use it anyway (to test)?
  • e

    early-butcher-76809

    02/26/2023, 10:02 PM
    Sure. I found it in HaxeUI_Base.
  • b

    bright-gpu-74537

    02/26/2023, 10:02 PM
    great, thanks 🙂
  • f

    fancy-jackal-32157

    02/26/2023, 10:18 PM
    Oh, hi, I suppose we can continue to discuss that issue here, then 🙂
  • b

    bright-gpu-74537

    02/26/2023, 10:19 PM
    haha, true true... i need to make a repro first, but not gonna do that now... ive another font (as well as yours) so just gonna see whats going on with them
  • f

    fancy-jackal-32157

    02/26/2023, 10:25 PM
    No problem, I can wait. I will be probably using SDF fonts anyway (they look really nice now I know I need to use the alpha channel). I'm testing bitmap fonts because there is an issue with selected text background in Heaps when using SDF fonts, hopefully they can resolved it soonish 🙂
  • b

    bright-gpu-74537

    02/27/2023, 9:46 AM
    so wrt to this, i think i might change things about a little. Rather than
    SDFFonts.register
    , i think might have
    Fonts.registerSdf
    , and also have
    Fonts.register
    where you can register an actual heaps
    Font
    with all the settings etc setup... i still havent made a repro yet, but im thinking that the font settings in heaps is very specific to the font data (ie, the file(s)) so it might also be useful to be able to just register any font with the right settings (still thinking about it : ) )
  • f

    fancy-jackal-32157

    02/27/2023, 2:41 PM
    I think, that technically there is no difference between SDF and bitmap fonts. Distance field information is encoded in the pixels of individual glyphs and Heaps uses a different shader that utilises that information but an SDF font still can be used as a normal bitmap font, only the glyphs will be blurry because they're encoded that way. So we need to tell Heaps which type of font it is in order for Heaps to use the right shader. I don't know if this piece of information is relevant or useful to you and you probably already knew, but I wanted to share what I know so far in case anyone wonders what's the difference.
  • e

    early-butcher-76809

    02/27/2023, 2:50 PM
    Yeah, using my SDF font without registering it displayed it upside down, like a bitmap one.
  • b

    bright-gpu-74537

    02/27/2023, 4:04 PM
    i actually didnt know that about SDF vs BMP so nice one 👍
  • a

    ambitious-knife-25690

    02/27/2023, 4:11 PM
    Ian is there a sample app somewhere I can test the ceramic backend with?
  • b

    bright-gpu-74537

    02/27/2023, 4:12 PM
    nothing defacto no, not really
  • b

    bright-gpu-74537

    02/27/2023, 4:13 PM
    i would suggest the explorer, but its some bits in there that will almost certainly break
  • a

    ambitious-knife-25690

    02/27/2023, 5:14 PM
    <Image resource="ceramic" width="130" height="170" />
  • a

    ambitious-knife-25690

    02/27/2023, 5:14 PM
    it seems like with the existing backends,
    width/height
    are somewhat ignored
  • a

    ambitious-knife-25690

    02/27/2023, 5:15 PM
    and you just take the original image's dimensions and work off that
  • a

    ambitious-knife-25690

    02/27/2023, 5:19 PM
    is it "correct" of me to take those values and set the image to them (by doing visual.width = parentComponent.width)
  • b

    bright-gpu-74537

    02/27/2023, 5:19 PM
    well, the image cx/cy is use if the image is autosized, yeah
  • b

    bright-gpu-74537

    02/27/2023, 5:20 PM
    if the cx/cy is supplied you should be resizing the image
  • b

    bright-gpu-74537

    02/27/2023, 5:20 PM
    but it will be passed to you, you should just honour that
  • b

    bright-gpu-74537

    02/27/2023, 5:21 PM
    90% of the time it will be the same dimentions as the original image, but it might not be, it could be specified by the user, or as part of a %, or as part of a "stretch" operation
  • a

    ambitious-knife-25690

    02/27/2023, 5:22 PM
    what is "cx/cy"?
  • b

    bright-gpu-74537

    02/27/2023, 5:22 PM
    eg, heaps: https://github.com/haxeui/haxeui-heaps/blob/master/haxe/ui/backend/ImageDisplayImpl.hx#L31-L45
  • b

    bright-gpu-74537

    02/27/2023, 5:22 PM
    width / height
  • a

    ambitious-knife-25690

    02/27/2023, 5:22 PM
    ahh
  • b

    bright-gpu-74537

    02/27/2023, 5:23 PM
    so that _imageWidth, _imageHeight will tell you what haxeui wants you to draw the image as
1...154415451546...1687Latest