calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
168 stars 41 forks source link

Strange algorithm for drawing bold text #232

Open x-qq opened 4 years ago

x-qq commented 4 years ago

Currently, text that uses FONT_BOLD is drawn 1) using bold.ttf 2) which is drawn twice with a 1 pixel offset (on top of already drawn text).

I guess this is made to achieve even more boldness?

https://github.com/calref/cboe/blob/master/src/gfx/render_text.cpp#L181

I think it would be better to simply use an appropriate font and not have to do this.

clort81 commented 4 years ago

Appropriate bitmap fonts, free to use - do not get blurred by SFML.

https://clort.shell.ircnow.org/ClortSans1_0.zip

https://clort.shell.ircnow.org/ClortSansBold1_0.zip

x-qq commented 4 years ago

Tried disabling the double-drawing code and using LiberationSans-Bold.ttf in place of bold.ttf.

Results:

libsans

This seems reasonably good?

According to https://en.wikipedia.org/wiki/Liberation_fonts it is available for use under a permissive license.

Original double-drawn bold.ttf for comparison:

orig