bohoomil / fontconfig-ultimate

freetype2-infinality run-time settings => infinality compatible fontconfig => infinality-bundle
454 stars 38 forks source link

[feature request] Make 'custom' style load an empty template for easier customization #125

Open bohoomil opened 8 years ago

bohoomil commented 8 years ago

Originally posted by Ropid on Arch Linux forum:

I was getting confused because there seems to be no reason for INFINALITY_FT="custom". It seems when you set every single variable, you can have INFINALITY_FT set to any of the styles. The other variables will override the internal settings of any of them. I felt that made no sense so then I thought the reason that the documentation suggests "custom" is because it's intended as some sort of clean state with all variables set to zero.

goddesse commented 8 years ago

@mviikki16 Because by default, the infinality parameters are semantically turned off, it should be sufficient to remove everything under "custom"'s (similar to disabled) template in ftinf_sh.gperf and regenerate the C file with with the patched gperf 3.0.4 to achieve this right?

@bohoomil I'm also happy to provide a patch for this if you need and I can create one that applies on top of your integration of aejsmith's patch so you don't have to deal with a merge conflict.

mviikki16 commented 8 years ago

"custom" was originally intended to hold ideal values for users building the code themselves and avoid evironment "pollution". If you use the environment it does not matter what INFINALITY_FT is pointing at (if missing or it points to an invalid location then "ultimate3" will set the defaults).

Indeed, the values not explicitly mentioned default to '0' (for all structure members) but I don't see much point in making "custom" same as "default" i.e. nearly empty.

WIth gperf, as long as the same .name members are kept it's possible changing only the .c files and the hashing will still work fine (nicer to have these in sync but if you want to do some quick changes e.g. for "custom" fields no need to trouble yourself with building a suitable gperf program to do it).