h/t Shin-ichi for reporting the warning
warning: the comparison will always evaluate as 'true' for the address
of 'filename' will never be NULL [-Waddress]
h/t Shin-ichi for reporting seeing warnings about
warning: the comparison will always evaluate as 'true' for the address of 'sizes' will never be NULL
Magic tool ".sizes" was recently turned into an array (per-mode of the
Magic tool), but a few references forgot to account for that.
Corrected like so
e.g., from
if (magics[magic_group][cur_thing].sizes)
to
if (magics[magic_group][cur_thing].sizes[magic_modeint(magics[magic_group][cur_thing].mode)])
If RSVG is < 2.52.x, go back to using rsvg_handle_get_dimensions()
(which is deprecated these days) instead of the newer
rsvg_handle_get_intrinsic_size_in_pixels() that replaced it.
(Shin-ichi reports that function is not available on Rocky Linux 9.)
Note - I also recently replaced rsvg_handle_render_cairo() with
rsvg_handle_render_document(), but Shin-ichi didn't report problems
with that; it's been available since 2.46.
See https://sourceforge.net/p/tuxpaint/bugs/278/
When selecting a label that has a color not found in the built-ins,
we change to the color picker; however, when rendering its button,
it looked wrong and would not fit to the right size (had 48x48
hard-coder in there, still!) Instead, using `render_color_button()`
to just re-render it.
Also, dropping LOW_QUALITY_COLOR_SELECTOR which had been used by
some embedded platforms we don't seem to support any more (Nokia Maemo
and OLPC XO-1).
Wrap new $PATH stuff done (to get dummy 'inkscape' used,
for rsvgconvert purposes) in quotes to try and help with
build problems Shin-ichi had with the Windows version.
e.g., for Chinese Traditional, try to use the full font (that
we supply as an optional download), then try the 'subset' font
that we ship with Tux Paint.
Made sure to add our font dir (e.g., /usr/local/share/tuxpaint/fonts/)
to FontConfig's directories before trying to load uifont!
Also, update font names to match what we ship with Tux Paint.
WIP -- Would like to supply some alternatives.
Tim Dickson wrote in --
I figured out the cause of the out-of-tree fontconfig cache
creation, and (with help from another packager) a fix.
The problem only occurs when inkscape is installed (which changes the
target tool that imagemagik uses for converting svg files from
rsvgconvert to inkscape's svg conversion program.)
A new `PACKAGE_ONLY` variable to Makefile can be used to
place launcher icon files into $(DESTDIR)$(PREFIX), rather
than using `xdg-...` tools to install them. (Avoids polluting
local filesystem while generating packages, e.g. for Slackware Linux)
h/t Tim Dickson