Jump to content
Phodex Games

Issue rendering text

Recommended Posts

Hi I have a small problem. I think the pictures should explain it pretty good :)

With font size of 12 see the terrible cut on the top?:


With font size 20 it is a little bit better but somehow not as sharp as it should be;


This is how I would expect it to look like:


I am rendering the text with the default arial.ttf font, I render the following color Vec4(0, 0, 0, 255) and with blendmode Blend.Alpha. So whats the problem? I remember the text rendered sharper another time, but I dont know what I am doing wrong atm? Any suggestions?



Share this post

Link to post
59 minutes ago, macklebee said:

Hard to tell exactly if the same issue since no code was provided but it may be an antialiasing issue - if so, not quite sure why Josh has not reverted this back yet. Just set your font's style to Font.Smooth when loading.


Okey just did this and it kind of is part of the fix, it also seems to be important, if you render the text to keep the following order:

1. Set context blend mode

2. Set context font

3. Set color

4. Draw text


EDIT: Ok still found an issue :( it seems to depend on the font size:

Font size 12:


Font size 20:


Font size 50:


The code where it gets drawn is:

--I use an renderer class, which renderes all my objects in on script, to handle render priority:
--current stands for the current rendering object
if current.font ~= nil then context:SetFont(current.font) end
context:DrawText(current.text, current.pos.x, current.pos.y)



Share this post

Link to post

I think we just need to wait for fix. I noticed same problem and smoothing helped a lot, but it still is not as good it was before.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...