-
Notifications
You must be signed in to change notification settings - Fork 0
Replace quesoglc with harfbuzz #4507
Comments
Vincent uploaded file |
Vincent uploaded file |
Vincent commented I sightly updated the patch to remove some default argument that were not useful. |
Cyp changed blocking which not transferred by tractive |
Cyp changed blockedby which not transferred by tractive |
Cyp commented Some initial testing of 5bc1b2cec399359465fbef25b22c4678645b6c1a on Linux, it doesn't compile unless I do:
It then crashes in the following assertion:
Note that if |
Per uploaded file This fixes the patch to work on my system |
Per commented The problem was, if that was not clear, that the path is incorrect, or at least not guaranteed to be correct. I think relying on system font paths is dubious, and we should be loading fonts from our data directory, or font files installed along side the executable, instead. |
Vincent uploaded file Remove assert() and change font path |
Vincent commented I applied Per's change to my patch. About the font path : what is the "official" data directory in a linux install ? I used the font path existing in bash for Ubuntu (which is the one on Ubuntu). Since WZ2100 use a single font (DejaVuSans and the Bold variation) which is shipped as part of the game it makes sense to use a local path ; on the other hand I fear that "make install" script may break font path or that distro may want to use the system DejaVu ttf file. |
Vincent commented I have an issue with +#include <freetype/ftglyph.h>, it seems distro dépendent. |
Per commented I like your new font rendering a great deal. Getting rid of QuesoGLC is huge, and the new system looks good. I don't think we should load fonts from the system directories. Instead, now that we have greater control over the font system, we should treat fonts like any other data resource, and put them in our .wz files. I've implemented this (but when reading from our data system, you cannot do this through static variable initialization - which I think in general is a bad idea). I've made some modifications to your patch, and pushed it to my repo. See If you think those changes are okay, then I'll push it to master. (I'm not sure if I should merge the two commits, or not. And if I should merge, how. That is, I don't know what is the proper git-iquette for such things.) What I would like to ask going forward, though, is that please try to write more straightforward and simple code. I know it is fun to write code as cleverly and optimized as possible, but that kind of code is a lot harder for other people to review, fix bugs in, and improve on later. Keep in mind that not everyone in the world is a c++11 wizard. |
Vincent commented I think you can push it to master. I'm glad font can be used as a resource like any others, it should make packaging more consistent between platforms. |
1 similar comment
Vincent commented I think you can push it to master. I'm glad font can be used as a resource like any others, it should make packaging more consistent between platforms. |
Per Inge Mathisen <per.mathisen@...> changed status from |
Per Inge Mathisen <per.mathisen@...> changed owner from `` to |
Per Inge Mathisen <per.mathisen@...> changed resolution from `` to |
Per Inge Mathisen <per.mathisen@...> commented In Warzone2100/warzone2100@cb02fcf:
|
resolution_fixed
type_patch (an actual patch, not a request for one)
| by VincentThis patch replaces quesoglc with direct harfbuzz + freetype usage.
In addition to sharper text the addition of harfbuzz means that some scripts like arabic
or hindic can be properly supported since harfbuzz provides ligature substitution.
The rendering uses a stripped down iv_drawImage function so that it will work with any
graphic API that implements iv_drawImage.
I'm developping with Visual Studio 2015, I updated configure.ac and tested that it works
on bash for Ubuntu but I think some testing on Linux and Mac are welcomed.
Issue migrated from trac:4507 at 2022-04-16 12:36:57 -0700
The text was updated successfully, but these errors were encountered: