Showing posts with label fonts. Show all posts
Showing posts with label fonts. Show all posts

15 March 2014

566. Briefly: Annoying warnings when plotting using gnuplot and octave on wheezy March 2014.

Note: I'm not going to give a proper fix for this, but rather a work-around -- and one which isn't very good at that.

When using gnuplot or plotting in octave on wheezy I keep getting the following warnings.
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-ukai.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-ukai.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-ukai.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-ukai.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-ukai.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 16: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 28: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 28: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 28: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 28: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-arphic-uming.conf", line 28: Having multiple  in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/64-arphic-uming.conf", line 8: Having multiple values in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/64-arphic-uming.conf", line 21: Having multiple values in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/64-arphic-uming.conf", line 34: Having multiple values in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/64-arphic-uming.conf", line 47: Having multiple values in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/65-droid-sans-fonts.conf", line 103: Having multiple values in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/65-droid-sans-fonts.conf", line 138: Having multiple values in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-baekmuk.conf", line 10: Having multiple values in  isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-baekmuk.conf", line 23: Having multiple values in  isn't supported and may not work as expected

My 'solution' was a bit radical -- I had already set up a system with apt-pinning (http://verahill.blogspot.com.au/2014/03/562-pulling-in-glibc-214-from-testing.html) so I figured that pulling in the fonts from testing couldn't hurt, assuming there were no dependencies to worry about.

So I did:
sudo apt-get install -t testing fonts-arphic-uming
and this worked fine.

The old 41-arphic-uming.conf:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!--
  Serif faces
 -->
        <alias>
                <family>AR PL ShanHeiSun Uni</family>
                <family>AR PL ShanHeiSun Uni MBE</family>
                <family>AR PL UMing CN</family>
                <family>AR PL UMing HK</family>
                <family>AR PL UMing TW</family>
                <family>AR PL UMing TW MBE</family>
                <default><family>serif</family></default>
        </alias>
<!--
  Monospace faces
 -->
        <alias>
                <family>AR PL ShanHeiSun Uni</family>
                <family>AR PL ShanHeiSun Uni MBE</family>
                <family>AR PL UMing CN</family>
                <family>AR PL UMing HK</family>
                <family>AR PL UMing TW</family>
                <family>AR PL UMing TW MBE</family>
                <default><family>monospace</family></default>
        </alias>
</fontconfig>
The new 41-arphic-uming.conf:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!--
  Serif faces
 -->
        <alias>
                <family>AR PL ShanHeiSun Uni</family>
                <default><family>serif</family></default>
        </alias>
        <alias>
                <family>AR PL ShanHeiSun Uni MBE</family>
                <default><family>serif</family></default>
        </alias>
        <alias>
                <family>AR PL UMing CN</family>
                <default><family>serif</family></default>
        </alias>
        <alias>
                <family>AR PL UMing HK</family>
                <default><family>serif</family></default>
        </alias>
        <alias>
                <family>AR PL UMing TW</family>
                <default><family>serif</family></default>
        </alias>
        <alias>
                <family>AR PL UMing TW MBE</family>
                <default><family>serif</family></default>
        </alias>
<!--
  Monospace faces
 -->
        <alias>
                <family>AR PL ShanHeiSun Uni</family>
                <default><family>monospace</family></default>
        </alias>
        <alias>
                <family>AR PL ShanHeiSun Uni MBE</family>
                <default><family>monospace</family></default>
        </alias>
        <alias>
                <family>AR PL UMing CN</family>
                <default><family>monospace</family></default>
        </alias>
        <alias>
                <family>AR PL UMing HK</family>
                <default><family>monospace</family></default>
        </alias>
        <alias>
                <family>AR PL UMing TW</family>
                <default><family>monospace</family></default>
        </alias>
        <alias>
                <family>AR PL UMing TW MBE</family>
                <default><family>monospace</family></default>
        </alias>
</fontconfig>
It just remained to pull in the rest of the offending fonts:
sudo apt-get install -t testing fonts-arphic-ukai fonts-droid fonts-baekmuk

08 January 2012

41. Chinese character and input support on debian testing

Update: You should also install support for gtk and gtk3:
sudo apt-get install ibus-gtk3 ibus-gtk
in order to be able to use it with e.g. thunderbird.

Original post:
Here's how to set up Chinese (simplified) support in Gnome 3 /gnome-shell and the terminal (bash).

First install the fonts:
sudo apt-get install fonts-arphic-*

Next. add Chinese via locales:
sudo dpkg-reconfigure locales

Select
zh_CN.UTF-8

(For traditional characters choose zh_HK, zh_SG or zh_TW)

As default language English is probably a good idea
In my case it's en_AU.UTF-8

Edit ~/.bashrc and add the following lines:
LANGUAGE=zh_CN.UTF-8
LANG=zh_CN.UTF-8

Run
source .bashrc

Install ibus:
sudo apt-get install ibus-pinyin 
This pulls another 18 packages with it

Start ibus-daemon in terminal
An icon in the notification tray still appear
Right-click, choose Preferences (P)
Click on the second tab (input methods)
Select an input method -> Chinese -> Pinyin

You should now be able to choose between regular (latin) input and Chinese characters using Ctrl+Space.

To make ibus-daemon start with gnome, run
gnome-session-properties
and add
ibus-daemon

And you're more or less done.

Sogou is a popular pinyin database on the Windows platform -- but afaik it's not available for Linux. On Linux, it seems that the ibus-pinyin-db-open-phrase database is the default ibus database used to guess what characters you intend to type, but you can also install and select either ibus-googlepinyin or ibus-pinyin-db-android. After installation you need to select the database by going to preferences in the ibus daemon and selecting it as input method. Not being Chinese I can't tell whether sogou, google pinyin and android pinyin are comparable.

Sogou does however work with Google Chrome/Chromium on linux -- go to Preferences/Extensions -- Get More Extensions, and install the Sogou Cloud Pinyin Extension for Chrome.