Draw Text without filtering?

About Monkey 2 Forums Monkey 2 Programming Help Draw Text without filtering?

This topic contains 4 replies, has 4 voices, and was last updated by  nerobot 1 year, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11787

    therevills
    Participant

    I’m loading in a C64 font from here:

    https://aur.archlinux.org/packages/ttf-c64-fonts/

    Loading it into MX2 via “Font.Load”, setting the font in the canvas and drawing it via “canvas.DrawText”.

    Is there a way to draw the font without filtering? As I want the crisp pixel look.

    Currently it is rendering as the attached screenshot…

    Attachments:
    #11789

    PhatPeter
    Participant

    This might work?

    canvas.TextureFilteringEnabled = False

    #11793

    therevills
    Participant

    Perfect thanks Peter!

    I was disabling filtering on just the images…

    Do you have to do it per frame? Edit: yep you do…

    #11836

    Mark Sibly
    Keymaster

    I’ve added a textureFlags param to Font.Load in develop branch, although TextureFilteringEnabled is fine here too.

    #11875

    nerobot
    Participant

    I’ve added a textureFlags param to Font.Load in develop branch

    The only note here is – other methods with shader and textureFlags parameters have signature texFlags,shader but font now have shader,texFlags. Maybe you will fix that to be more consistent?

    With little sorry if someone started to use that (it’s easy to fix).

    Edited:  hmm, Image.Load also have  shader,texFlags.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.