intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Aug 17, 2018 10:28 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Oct 25, 2016 4:00 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 406
Location: USA
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.

_________________
Thunderword not forgotten, will pick back up 2nd half of 2018.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Oct 25, 2016 7:10 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 406
Location: USA
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.

Code:
propfont      KacstOne


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

_________________
Thunderword not forgotten, will pick back up 2nd half of 2018.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Oct 25, 2016 7:49 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2637
Location: The Midwest
Try a more complete font like Noto. Does Gargoyle handle it well in that case?

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Oct 25, 2016 8:24 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 406
Location: USA
Draconis wrote:
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 ;) 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!

_________________
Thunderword not forgotten, will pick back up 2nd half of 2018.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed May 31, 2017 6:07 am 
Offline

Joined: Wed May 31, 2017 12:44 am
Posts: 10
This worked for me using Noto. For posterity, the steps I took were:

Code:
# 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.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Jul 17, 2018 3:52 am 
Offline

Joined: Tue Jul 17, 2018 3:05 am
Posts: 4
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


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Jul 27, 2018 10:18 pm 
Offline

Joined: Thu Oct 28, 2010 12:29 pm
Posts: 121
Location: Utah
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.

_________________
Nathan Simpson - The other Infocom bugs list


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Jul 28, 2018 5:08 am 
Offline

Joined: Tue Jul 17, 2018 3:05 am
Posts: 4
Nathan wrote:
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 ;)
Thanks


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Jul 28, 2018 8:45 am 
Offline
User avatar

Joined: Wed Oct 14, 2009 4:02 am
Posts: 2506
You don't need a terminal, just a text editor :)


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group