Page 3 of 4

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sun Feb 09, 2020 15:16
by Nordal
Thanks for this great mod. I only use the simple wooden variant with default textcolor in wide mode. The signs fit everywhere, on post, on wall, hanging down...
And usecases are countless. Showing directions on small paths through the jungle, naming the content of chests, horse names in the stable...
I can even use umlaute, but mostly I use latin (having fun with it in medieval like settings).
Great work!

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Thu Apr 16, 2020 03:58
by skiphoppy
I think maybe I found a module dependency that isn't noted in basic_signs. Looks like it requires a sheet_metal item I don't have - I'm guessing that's from this steel mod? viewtopic.php?id=2014

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Thu Apr 16, 2020 04:11
by VanessaE
That's from Zeg9's steel mod. I somehow got roped into maintaining it. :-)

My fork can be found here: https://gitlab.com/VanessaE/steel

I often don't make one mod depend on another if the latter is only there to supply materials for crafting. That way creative servers need fewer mods.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Tue May 19, 2020 20:25
by skiphoppy
VanessaE wrote:
Thu Apr 16, 2020 04:11
That's from Zeg9's steel mod. I somehow got roped into maintaining it. :-)

My fork can be found here: https://gitlab.com/VanessaE/steel

I often don't make one mod depend on another if the latter is only there to supply materials for crafting. That way creative servers need fewer mods.
I can't find sheet metal in there - is it possible it got moved to a different mod?

I see the recipe from Zeg9's steel thread; if I can get the icon I can create it all... any chance this one item could be added into the basic materials mod?

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Tue May 19, 2020 20:46
by skiphoppy
I grabbed the whole dreambuilder modpack hoping it would be in there, but I didn't find it there, either. I'm probably missing something very obvious. :)

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Wed May 20, 2020 01:56
by VanessaE
I guess I was wrong about the sheet metal. Maybe that was in an old fork of mine or something. I suppose basic_materials is a suitable place for it then.

BUT, I seem to recall having changed all metal signs in signs_lib and basic_signs to be made from the default steel sign, some time back. So maybe we first need to sort that out, then define a use-case for sheet metal.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Thu May 21, 2020 02:05
by skiphoppy
Thanks for taking a look!

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sat May 23, 2020 21:24
by luvo
Hello! I recently joined the community. I tried the signs_lib mod for a friends server and found that, for example, the ñ character is not correct renderized (__ instead). I searched this post and found arround 2016 some comments talking about ISO/IEC 8859-1 support, but I can't make it work. Any idea?

I'm using last version (5.3.0) from minetest from github, last version of minetest_game also from source and the master branch of this mod (b633a4b commit). I'm testing only that mod and unified_inventory. Also I tried to change the language to Spanish, but nothing changed (even with the /regen_signs command).

Thanks in advance!

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon May 25, 2020 18:44
by JoshMars
luvo wrote:
Sat May 23, 2020 21:24
Hello! I recently joined the community. I tried the signs_lib mod for a friends server and found that, for example, the ñ character is not correct renderized (__ instead). I searched this post and found arround 2016 some comments talking about ISO/IEC 8859-1 support, but I can't make it work. Any idea?

I'm using last version (5.3.0) from minetest from github, last version of minetest_game also from source and the master branch of this mod (b633a4b commit). I'm testing only that mod and unified_inventory. Also I tried to change the language to Spanish, but nothing changed (even with the /regen_signs command).

Thanks in advance!
This kind of question is repeatedly ignored in this thread. The lack of documentation/guide for adding support for other characters within ISO/IEC 8859-1 (which this thread suggests is supported) is frustrating.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon May 25, 2020 19:24
by VanessaE
The problem with other languages isn't that they're being ignored, it's that signs_lib has to render the sign text server-side using hand-drawn bitmapped fonts, so changing your system or Minetest language settings will have no effect.

To my knowledge, only Latin and Cyrillic are supported right now, but it shouldn't be hard to get other languages in there. Pull requests welcome, as always.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Tue Nov 24, 2020 16:37
by zeuner
Hi there!

I did some work on creating generic support for extending the library to arbitrary Unicode characters. I'd like to discuss the possible option of integrating the effort into the mainline signs_lib code as it might be useful for other users as well.

Unfortunately, gitlab still doesn't like me and spams me with captcha requests, so I put this up on github.

A sample with support for non-ASCII characters from the French, German and Polish languages can be found here: https://github.com/zeuner/signs_lib/tre ... opean-test. Here is also a visual sample of the code in action:
screenshot_20201109_182153.png
(251.63 KiB) Not downloaded yet
This works by several changes:

Utf8ToAnsi has been cleaned up from some hard-coded numbers, instead it uses the data from the utf8_decode hierarchical table in order to figure out whether it is encountering a supported character.

This allows the new function unicode_install to add new supported characters, which happens from the nonascii-*.lua files. It's expected that server owners might not want to install support for all possible languages, so this is currently kept in a modular way.

The new textures are auto-generated from the Liberation TrueType fonts using harfbuzz. The scripts used for this have also been uploaded: https://github.com/zeuner/signs-font-generate.

Feel free to try, criticize, merge and/or use...

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Wed Nov 25, 2020 14:11
by VanessaE
I'm open to the idea of generic language support. I'd considered it a few times, but I was never quite sure how to do it, and I was always too lazy to expand the fonts. ;-)

However, when I check your repository, you've forked your code off of someone else's fork, which is VERY outdated. You'll need to clone from my upstream repo on gitlab, and base your work on top of that. Otherwise I don't expect it'll be mergeable (or work as you expect).

As for the helper scripts, seems reasonable. As I read it, it they're only ever used when adding new languages? In any case, you should add them to the final pull request so that they're distributed with signs_lib (maybe inside a "utils" directory or something, but definitely not using git submodules, because they suck :-) ). That'll make it easier for others to expand the fonts/languages in the future.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Thu Nov 26, 2020 05:43
by zeuner
VanessaE wrote:
Wed Nov 25, 2020 14:11
However, when I check your repository, you've forked your code off of someone else's fork, which is VERY outdated. You'll need to clone from my upstream repo on gitlab, and base your work on top of that. Otherwise I don't expect it'll be mergeable (or work as you expect).
At the time of my forum post, my branch was in sync with your 8b975d7 commit from 3rd June 2020 (https://github.com/zeuner/signs_lib/com ... 10ebde8e71). In any case, I will try and merge your latest changes.
VanessaE wrote:
Wed Nov 25, 2020 14:11
As for the helper scripts, seems reasonable. As I read it, it they're only ever used when adding new languages? In any case, you should add them to the final pull request so that they're distributed with signs_lib (maybe inside a "utils" directory or something, but definitely not using git submodules, because they suck :-) ). That'll make it easier for others to expand the fonts/languages in the future.
My nonascii-european-test branch only uses the scripts to add more languages. But there is also a write-ascii.sh script which can be used to replace ASCII characters as well, so all characters look the same way. I didn't do that in my public repo because the upstream ASCII character textures look better than the auto-generated textures, and I don't know how the upstream textures were created.

I guess the scripts could also be used to completely switch to another TrueType font.

Will add them to my signs_lib repo once I consider them less experimental.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Thu Nov 26, 2020 06:11
by VanessaE
zeuner wrote:
Thu Nov 26, 2020 05:43
At the time of my forum post, my branch was in sync with your 8b975d7 commit from 3rd June 2020 (https://github.com/zeuner/signs_lib/com ... 10ebde8e71). In any case, I will try and merge your latest changes.
Strange, when I look at your repo, it shows "forked from FozLand/signs_lib" with only 5 commits, at over 4 years old, and "This branch is 118 commits ahead of FozLand:master" for your "nonascii-european-test" branch.

Something is not right, here. :-P

I suggest you delete your Github fork, make a fresh clone directly from my Gitlab repository, make a new branch based off of 'master', apply your work on top of it, push that to a new remote repo (preferably also on Gitlab so we can cut Github out of the loop), and then delete your old local copy (after making suitable backups, of course). That way the history is clean, with no association to anything unusual.
zeuner wrote:
Thu Nov 26, 2020 05:43
My nonascii-european-test branch only uses the scripts to add more languages. But there is also a write-ascii.sh script which can be used to replace ASCII characters as well, so all characters look the same way. I didn't do that in my public repo because the upstream ASCII character textures look better than the auto-generated textures, and I don't know how the upstream textures were created.
They were made with Imagemagick, by creating a new image and writing text to it, one character at a time. Not sure why it isn't in the signs_lib repo, but here it is:

Code: Select all

#!/bin/bash

# Simple font generator for homedecor signs mod
# By Vanessa Ezekowitz
#
# License:  WTFPL

# Usage:
#
# signs-chargen.sh fontname fontheight [top-excess bottom-excess left-excess right-excess]
#
# font is the standard X11 font spec, in quotes, such as:
# "-*-helvetica-*-r-*-*-12-*-*-*-*-*-*-*"
#
# Note that top+bottom excess can easily exceed the specified font size.  The excess values
# must all be specified if any are.

textfont=$1
fontheight=$2
texcess=$3
bexcess=$4
lexcess=$5
rexcess=$6

pagesize="-size \"$((fontheight*2))x$((fontheight*4))\" xc:none"
cmdbase="convert $pagesize -font \"$textfont\" -gravity North -pointsize $fontheight "
trimargs1="+repage -gravity West -background red -splice 1x0 -background green -splice 1x0 -trim  +repage -chop 1x0"
trimargs2="+repage -gravity East -background red -splice 1x0 -background green -splice 1x0 -trim  +repage -chop 1x0"

choptopbottom="-gravity North -chop 0x"$texcess" -gravity South -chop 0x"$bexcess
chopsides="-gravity West -chop "$lexcess"x0 -gravity East -chop "$rexcess"x0"


# numbers require a slightly different command:

for charcode in `seq 48 57`; do
	char=$(printf \\$(printf "%o" $charcode))
	hexcode=$(echo -n "$char" |xxd -ps)
	command=$cmdbase" -annotate 0 \"$char\" hdf_"$hexcode".png"
	echo "$char : $hexcode"
	eval $command
done

# then the rest of the ascii set, except there are a few we have to skip

for charcode in 32 `seq 35 47` `seq 58 91` 93 94 95 `seq 97 126`; do
	char=$(printf \\$(printf "%o" $charcode))
	hexcode=$(echo -n "$char" |xxd -ps)
	command="$cmdbase -draw \"text 0,0 $char\" hdf_"$hexcode".png"
	echo "$char : $hexcode"
	eval "$command"
done

# those special cases are ! " * \ `

command="$cmdbase -annotate 0 \! hdf_21.png"
echo "! : 21"
eval $command

command="$cmdbase -annotate 0 \\\" hdf_22.png"
echo "\" : 22"
eval $command

command="$cmdbase -annotate 0 \* hdf_2a.png"
echo "* : 2a"
eval $command

command="$cmdbase -annotate 0 \\\\\\\\ hdf_5c.png"
echo "\\ : 5c"
eval $command

command="$cmdbase -annotate 0 \\\` hdf_60.png"
echo "\` : 60"
eval $command

if [ -z "$trimargs1" ] ; then 
	for i in `ls *.png`; do
		mogrify +repage $choptopbottom $chopsides $i
	done
else
	for i in `ls *.png`; do
		convert $i $trimargs1 XXXXX$i
		mv XXXXX$i $i
		convert $i $trimargs2 XXXXX$i
		mv XXXXX$i $i
		convert $i $choptopbottom $chopsides XXXXX$i
		mv XXXXX$i $i
	done
fi

convert -size $(((fontheight/2)+1))x$((fontheight*4)) xc:none $choptopbottom $chopsides hdf_20.png

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sat Nov 28, 2020 13:21
by zeuner
VanessaE wrote:
Thu Nov 26, 2020 06:11
[...]
Strange, when I look at your repo, it shows "forked from FozLand/signs_lib" with only 5 commits, at over 4 years old, and "This branch is 118 commits ahead of FozLand:master" for your "nonascii-european-test" branch.

Something is not right, here. :-P
I think this is due to heuristics github uses to determine forks. I never even heard of FozLand's repo before github mentioned it on my repo's page. When I first worked on my signs_lib repo, I forked it from https://github.com/minetest-mods/signs_lib. But forking are not explicitly represented in the repos, so if github didn't record that fact, it can only look what repos have similar commits. In cases where the original upstream repo has been deleted, it's not the first time I see that github considers some random other fork as being my upstream repo.

I could just fetch your latest changes from gitlab into my master branch without any merge or rebase operation, so I still consider the history as clean. You should easily be able to merge my changes once you find them technically appropriate.
VanessaE wrote:
Thu Nov 26, 2020 06:11
I suggest you delete your Github fork, make a fresh clone directly from my Gitlab repository, make a new branch based off of 'master', apply your work on top of it, push that to a new remote repo (preferably also on Gitlab so we can cut Github out of the loop), and then delete your old local copy (after making suitable backups, of course). That way the history is clean, with no association to anything unusual.
Unfortunately, gitlab still doesn't work well for me. It always creates captcha requests, which github doesn't. This does even happen for the git CLI tools, effectively blocking them. When I want to pull commits from gitlab, I currently look for SOCKS proxies until I can get git to access the repo. This is also why I posted my changes to the "currency" mod in the forum instead of filing a pull request directly.

I feel sorry for the hassle this creates, but I also don't understand why gitlab doesn't keep their HTTPS interface captcha-free, thereby allowing easy access for CLI tools.

I'm not opposed to someone creating a clone of my repo on gitlab, though.
VanessaE wrote:
Thu Nov 26, 2020 06:11
[...]
They were made with Imagemagick, by creating a new image and writing text to it, one character at a time. Not sure why it isn't in the signs_lib repo, but here it is:

[...]
Ok, I see. I think I remember the signs-chargen.sh script from the https://github.com/kaeza/minetest-signs_lib-extrafonts.

Interesting idea to write the text using Imagemagick, which I hadn't considered although I use Imagemagick for all the post-processing. I'm not yet sure whether I feel comfortable with fully adopting that approach, though. I like being able to specify a particular .ttf file so I can be sure about its license. With the signs-changen.sh script, I guess what comes out will pretty much depend on the font configuration on the machine where it was ran.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sat Dec 05, 2020 20:23
by zeuner
I took some ideas from the signs-chargen.sh script and applied them to my texture generator, like using ImageMagick's -annotate flag to render the characters.

I kept using a fixed .ttf file. Otherwise, it's hard to have reproducible texture output.

Also, I didn't like having hard-coded behaviour for different types of characters as this isn't expected to extend well to new characters. Instead, I extract the character width from the -debug annotate output.

If I don't find any show-stoppers in the new approach, this is what will go to the "util" directory of my signs_lib fork.

For now, I uploaded the new characters to my repo. Also, I created a new screenshot:
screenshot_20201205_190239.png
(147.22 KiB) Not downloaded yet
.

The character textures look much clearer now. The characters seem slightly smaller than on the initial textures when using the same point size. I guess this is due to differences between the Liberation font and the chosen font on the machine where the initial textures were created.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sat Dec 05, 2020 20:36
by VanessaE
Er, next time take the screenshot in the daytime. I can't see anything there :-)

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Dec 07, 2020 12:49
by zeuner
VanessaE wrote:
Sat Dec 05, 2020 20:36
Er, next time take the screenshot in the daytime. I can't see anything there :-)
Yet another attempt...
screenshot_20201207_133609.png
(129.24 KiB) Not downloaded yet
Also, I updated the nonascii (engine changes only, no new characters) and nonascii-european-test (sample support for french, german and polish characters) branches to contain the texture generation scripts.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Dec 07, 2020 13:32
by VanessaE
Looks pretty good! What's next?

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Dec 14, 2020 17:25
by Pikulla
Hi togehter, When i activate the signlib mod i get during the loading of the game these error:
error mt.jpg
(20.23 KiB) Not downloaded yet
,
error mt2.jpg
(21.9 KiB) Not downloaded yet
. i play with mt 5.0.0, 4.5.0. the mods basicsign and streetssign are active and run without problems. maybe there is a conflict with one of my mods, here are my active mods what runs without any problems:
Mods.jpg
(82.52 KiB) Not downloaded yet
. please advise what i can do to activate the signslib.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Dec 14, 2020 17:45
by VanessaE
Maybe your streets modpack is outdated? My code looks for the streetspoles mod therein before trying to override the "bigpole" nodes in it, and it does so to allow placing a sign directly onto the pole (with a mounting bracket so it looks nice), so if it's finding that mod, which is supposed to provide that item, and that item ain't there, the streets mod is not what signs_lib expects it to be.

Normally if a mod should allow a sign on one of its poles, it's that mod that should provide the necessary node def items to hook into signs_lib, but streets mod doesn't, so signs_lib does it on its own in its compat.lua component (which is also where minetest_game's default fences are handled).

Otherwise, simply enabling signs_lib by itself does nothing special, as it's supposed to just provide an API for things like basic_signs to hook into, that is apart from wedging into some nodes to allow for the above.

Also, stick to Minetest 5.3.0 or newer (and especially don't bother with the 0.4.x series, as that's massively obsolete).

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Tue Dec 15, 2020 15:39
by Pikulla
i did download the cheapie's roads modpack but it was not running at all. the mt 5.0.0 collapset and i install mt 5.3.0. lucky i did made a backup bevor. maybe i load down the wrong version of cheapie's roads modpack. can you give me a advise where i can download the correct version. thanks in advance for help.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Tue Dec 15, 2020 22:57
by VanessaE
Cheapie's roads modpack is at https://cheapiesystems.com/git/roads/

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Wed Dec 16, 2020 08:53
by Pikulla
yes these side i know, but where is the correct clone? down on the left side is a clone link, but is not working yet to me. is there another point where i can download the mod? thanks in advance for help.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Wed Dec 16, 2020 09:14
by VanessaE
Either of the two URLs at the bottom of that page can be used to obtain her modpack. I checked, both work for me.

git clone git://cheapiesystems.com/roads

(or the other one).