Gargoyle on Ubuntu 16.04 - Inform 7 Glulx, Git Unicode full

I’m still working on Git Interpreter on Android, and Unicode seems a problem. To better understand the problem, I decided to try building Gargoyle from source code off github on Ubuntu 16.04. This seems to work, except it has similar unicode problems of showing ‘?’ instead of Unicode characters.

I run Inform 7 on Ubuntu 16.04 and use the Git that is built-in, it seems to show all the Unicode I throw at it (Arabic, Chinese, etc). But feed the Release gblorb to Gargoyle and question marks come out.

Is it the default font? Which one would you suggest to make it behave like the Inform 7 built-in Git?

Some jam compile option? The unicode seems enabled as far as I can tell in the C code.

Anyone have this working? Thank you.

Ok, it seems font related. I can copy/paste the text from Gargoyle into other apps and all the Unicode is correct. If I spit out a sentence in the story with Korean, Arabic, and English words… you get question marks depending on the font I set in garglk.ini settings.

propfont      KacstOne

And then the Arabic appears, but everything else is question marks.

Try a more complete font like Noto. Does Gargoyle handle it well in that case?

I installed and told it to use Noto, it doesn’t work any better than say “Ariel”.

In Inform 7, without any extensions, I can put “This is Unicode content. A नमस्ते A, B أهلاً وسهلاً B, C 你好 C, D 봉주르 D.” - and on Ubuntu 16.04 that shows up perfect fine with git built-in interpreter. But the gargoyle-free or custom-built gargoyle (from source) will both show question marks. i can copy it right out of gargoyle into my Chrome browser and post it here without trouble :wink: So git and glk are getting the unicode to the screen, it seems rendering problem. And, if I change Gargoyle to use “KacstOne” as a font, that Arabic part will show up while everything else becomes question marks!

This worked for me using Noto. For posterity, the steps I took were:

# These are the basic build dependencies
sudo apt install libgtk2.0 libgtk2.0-dev libglib2.0 libglib2.0-dev glib-2.0 glib-2.0-dev jam git

# These are for SDL (sound support, in this case)
# If you don't need sound support and prefer not to install them, then don't
# Just remember to run the additional sed command commented out below
sudo apt install libsdl1.2-dev libsdl1.2debian libsdl-mixer1.2 libsdl-mixer1.2-dev libsdl-sound1.2 libsdl-sound1.2-dev

# Get the source
mkdir -p $HOME/src
cd $HOME/src
git clone 'https://github.com/garglk/garglk.git'
cd garglk

# Don't bundle fonts; use system ones exclusively
sed -i -r 's|^BUNDLEFONTS .*$|BUNDLEFONTS ?= no ;|' Jamrules

# If you didn't install SDL-1.2 (above), then you need to run this now:
#     sed -i -r 's|^USESDL .*$|USESDL ?= no ;|' Jamrules

# Now build it
# (contrary to what you expect, this doesn't install, just builds to ./build/dist)
jam install 2>&1 | tee build.log

# Make a wrapper script. I call it "gargoyle-free" to match the name
# of the binary in the official .deb distribution.
cd build/dist
cat << "EOF" > gargoyle-free
#!/bin/bash
MYDIR="$( cd "$( dirname $( readlink -e "${BASH_SOURCE[0]}" ) )" && pwd )"
export LD_LIBRARY_PATH="$MYDIR"
exec "$MYDIR/gargoyle" ${1+"$@"}
EOF
chmod 755 gargoyle-free

# Now install files to to $HOME/bin/gargoyle-files
# and executable to $HOME/bin/gargoyle-free
cd ../..
cp -r build/dist $HOME/bin/gargoyle-files
ln -s ./gargoyle-files/gargoyle-free $HOME/bin/gargoyle-free
cp garglk/garglk.ini $HOME/bin/gargoyle-files
hash -r

# Next, we need to set the configuration options.
# Note that Noto Sans Mono CJK is ONLY mono-spaced at size multiples of 3 (3, 6, 9, 12, 15, 18, 21, ...)!
# I choose size 15 here.
cp $HOME/bin/gargoyle-files/garglk.ini $HOME/.garglkrc
sed -i -r 's|^monofont .*$|monofont      Noto Sans Mono CJK SC Regular|' $HOME/.garglkrc
sed -i -r 's|^monosize .*$|monosize      15|' $HOME/.garglkrc
sed -i -r 's|^propfont .*$|propfont      Noto Sans CJK SC Regular|' $HOME/.garglkrc
sed -i -r 's|^propsize .*$|propsize      15|' $HOME/.garglkrc

# Now, to run it:
#     $HOME/bin/gargoyle-free ./MyGame.gblorb
#
# or ensure $HOME/bin is on your PATH:
#     echo 'export PATH=$HOME/bin:"$PATH"' >> $HOME/.bashrc
#     export PATH=$HOME/bin:"$PATH"
#     hash -r
#     which gargoyle-free    # Should point to ~/bin/gargoyle-free
#
# ... and then:
#     gargoyle-free ./MyGame.gblorb

I’m primarily using this to leave notes in Chinese, for when students encounter words they may not be familiar with and thus maintain the flow of the story.

I installed Gargoyle on Ubuntu 18.
But see no way to change font size or colours?
I am not tech savvy and need a GUI method.
Thanks

There is no GUI method. You edit the configuration file. I know that’s not “user-friendly”, but that’s the way it is.
The main file is called either garglk.ini or .garglkrc. You can also have per-game config files, named the same as the story file but with a .ini extension.
There are lots of comments in the garglk.ini file that comes with Gargoyle, and it really shouldn’t be overwhelming.

Overwhelming for one who never doesn’t understand linux terminal.
I managed to get gluxle and frotz working on wine anyway :wink:
Thanks

You don’t need a terminal, just a text editor :slight_smile:

This is not exactly useful, as you would need terminal to at least do some sort of find or locate command to find where the config file is. And I’ve been looking for an hour or so and I can’t find garglk.ini or .garglkrc anywhere. Where are the Gargoyle config files going to on 16.04?