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

skiphoppy
Member
Posts: 78
Joined: Sat Jun 10, 2017 01:50

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

by skiphoppy » Post

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

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

skiphoppy
Member
Posts: 78
Joined: Sat Jun 10, 2017 01:50

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

by skiphoppy » Post

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?

skiphoppy
Member
Posts: 78
Joined: Sat Jun 10, 2017 01:50

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

by skiphoppy » Post

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. :)

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

skiphoppy
Member
Posts: 78
Joined: Sat Jun 10, 2017 01:50

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

by skiphoppy » Post

Thanks for taking a look!

luvo
New member
Posts: 2
Joined: Sat May 23, 2020 21:14
GitHub: lulivi
IRC: luvo
In-game: Luvo

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

by luvo » Post

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!

JoshMars
Member
Posts: 111
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

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

by JoshMars » Post

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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

zeuner
Member
Posts: 55
Joined: Fri Dec 01, 2017 20:09
GitHub: zeuner

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

by zeuner » Post

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
screenshot_20201109_182153.png (251.63 KiB) Viewed 2022 times
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...

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

zeuner
Member
Posts: 55
Joined: Fri Dec 01, 2017 20:09
GitHub: zeuner

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

by zeuner » Post

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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

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
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

zeuner
Member
Posts: 55
Joined: Fri Dec 01, 2017 20:09
GitHub: zeuner

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

by zeuner » Post

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.

zeuner
Member
Posts: 55
Joined: Fri Dec 01, 2017 20:09
GitHub: zeuner

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

by zeuner » Post

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
screenshot_20201205_190239.png (147.22 KiB) Viewed 2022 times
.

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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Er, next time take the screenshot in the daytime. I can't see anything there :-)
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

zeuner
Member
Posts: 55
Joined: Fri Dec 01, 2017 20:09
GitHub: zeuner

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

by zeuner » Post

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
screenshot_20201207_133609.png (129.24 KiB) Viewed 2022 times
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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Looks pretty good! What's next?
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

Pikulla
Member
Posts: 15
Joined: Sun Nov 15, 2020 09:32
In-game: Pikulla

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

by Pikulla » Post

Hi togehter, When i activate the signlib mod i get during the loading of the game these error:
error mt.jpg
error mt.jpg (20.23 KiB) Viewed 2022 times
,
error mt2.jpg
error mt2.jpg (21.9 KiB) Viewed 2022 times
. 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
Mods.jpg (82.52 KiB) Viewed 2022 times
. please advise what i can do to activate the signslib.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

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).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

Pikulla
Member
Posts: 15
Joined: Sun Nov 15, 2020 09:32
In-game: Pikulla

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

by Pikulla » Post

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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Cheapie's roads modpack is at https://cheapiesystems.com/git/roads/
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

Pikulla
Member
Posts: 15
Joined: Sun Nov 15, 2020 09:32
In-game: Pikulla

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

by Pikulla » Post

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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

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).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

Pikulla
Member
Posts: 15
Joined: Sun Nov 15, 2020 09:32
In-game: Pikulla

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

by Pikulla » Post

i tryed again to download the link, but its still not working for me. i used a download app to get the download, but he tells me that the link is invalid. maybe im a bit to stupid to download it.

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests