Phodex Games Posted July 15, 2017 Share Posted July 15, 2017 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? Quote Link to comment Share on other sites More sharing options...
macklebee Posted July 15, 2017 Share Posted July 15, 2017 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. https://www.leadwerks.com/learn?page=API-Reference_Object_Asset_Font_Load 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Phodex Games Posted July 15, 2017 Author Share Posted July 15, 2017 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. https://www.leadwerks.com/learn?page=API-Reference_Object_Asset_Font_Load 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 context:SetBlendMode(current.blend) if current.font ~= nil then context:SetFont(current.font) end context:SetColor(current.color) context:DrawText(current.text, current.pos.x, current.pos.y) Quote Link to comment Share on other sites More sharing options...
Phodex Games Posted July 23, 2017 Author Share Posted July 23, 2017 Does nobody has any idea? Quote Link to comment Share on other sites More sharing options...
Core Posted July 30, 2017 Share Posted July 30, 2017 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.