Weird blurry black text

meesterkees

Pirate
Registered
LV
0
 
Joined
Jul 9, 2026
Messages
5
Reaction score
0
Points
3
working with mothanna tales of pirate 2022 DX9 files when i got it to work i get this weird blurry black font ive tried everything to make it work but it just doesnt anyone know how to fix?
 

Attachments

  • blur.webp
    blur.webp
    278 KB · Views: 43
Client\scripts\lua\font.clu

After making the changes, run compile_clu.bat; otherwise, the new font will not be used.
 
Client\scripts\lua\font.clu

After making the changes, run compile_clu.bat; otherwise, the new font will not be used.
i can make changes like arial font but the blurry black stays.
Even changes to preperty.clu changing text works but it never changes the color always black blurry if i use a color undefined in gui.clu it wil change to a light gray also barely readable.
only thing i managed to make work with help of AI is changes to mindpower engine in source making all text red but that also makes everything blurry.
 
Open the form script, for example, preperty.clu, and find the code for the label, for example:
Code:
labConshow = UI_CreateCompent( frmState, LABELEX_TYPE, "labConshow", 23, 8, 49, 191 )
UI_SetCaption( labConshow, "9527" )
UI_SetTextColor( labConshow, COLOR_PURPLE )
UI_SetLabelExFont( labConshow, DEFAULT_FONT, TRUE, COLOR_WHITE )

UI_SetTextColor( labConshow, COLOR_PURPLE )
COLOR_PURPLE - The main text color.
The color codes are set in gui.clu.
Code:
COLOR_BLACK = 4278190080
COLOR_RED = 4294901760
COLOR_WHITE = 4294967295
COLOR_PURPLE = 4293990336
COLOR_YELLOW = 4294967040
COLOR_BLUE = 4278190335
COLOR_GREEN = 4278255360
COLOR_PINK = 4294902015

Next come the additional settings.
UI_SetLabelExFont( labConshow, DEFAULT_FONT, TRUE, COLOR_WHITE )
DEFAULT_FONT - font from font.clu
TRUE - turning on the font shadow, FALSE - turning off the font shadow
COLOR_WHITE - font shadow color
 
Open the form script, for example, preperty.clu, and find the code for the label, for example:
Code:
labConshow = UI_CreateCompent( frmState, LABELEX_TYPE, "labConshow", 23, 8, 49, 191 )
UI_SetCaption( labConshow, "9527" )
UI_SetTextColor( labConshow, COLOR_PURPLE )
UI_SetLabelExFont( labConshow, DEFAULT_FONT, TRUE, COLOR_WHITE )

UI_SetTextColor( labConshow, COLOR_PURPLE )
COLOR_PURPLE - The main text color.
The color codes are set in gui.clu.
Code:
COLOR_BLACK = 4278190080
COLOR_RED = 4294901760
COLOR_WHITE = 4294967295
COLOR_PURPLE = 4293990336
COLOR_YELLOW = 4294967040
COLOR_BLUE = 4278190335
COLOR_GREEN = 4278255360
COLOR_PINK = 4294902015

Next come the additional settings.
UI_SetLabelExFont( labConshow, DEFAULT_FONT, TRUE, COLOR_WHITE )
DEFAULT_FONT - font from font.clu
TRUE - turning on the font shadow, FALSE - turning off the font shadow
COLOR_WHITE - font shadow col
thx for the effort these things did not change anything. however i fixed the problem somehow. i never ran compiler_table after i did (i dont know why or how) it got fixed.

now i can change things in clu files and it actually works
 
I have identified the cause of the problem. Thank you for pointing it out. The problem is with the color constants in gui.lua.
4294967295 does not fit into a signed int. On MSVC 14.51 x86 /O2, (int)4294967295.0 gives 0x80000000, and (int)4278190080.0 also gives 0x80000000. This is black with an alpha of 0x80. SetShadowColor writes it, and the offset glyph is drawn in this color. UI_SetTextColor(..., COLOR_BLACK) goes through the same cast, so the main glyph is the same color: two identical black copies with a shift of +1,+1.
I will send a pull request with the fixes soon.
 

Attachments

  • 1793809228115.webp
    1793809228115.webp
    307.7 KB · Views: 5