Monday May 25, 2009

Changing Truetype Fonts path to make NV and OpenSolaris same

Solaris Nevada will be "Changing Truetype Fonts path to make NV and OpenSolaris same". Post simple description one-page here for discussion.  It's automatic approved now. If you have any comments, please let me know asap.

Thursday Mar 19, 2009

关于字体的Bigadmin提交文章上线

最新提交给Bigadmin的关于字体知识的文章上线了。
谈谈字体那些事(第一部分):介绍根据外形字体分类
谈谈字体那些事(第二部分):介绍根据字体数据存贮格式分类
谈谈字体那些事(第三部分):介绍字体的大小的知识


计划继续将这个系列写下去。包扩介绍字体的使用,和字体是如何显示和工作的。

Wednesday Feb 11, 2009

font-conf 的资源连接

本篇主要是为了列出几个关于fonts有用的连接:

首先关于font-conf,英文的原版:http://www.fontconfig.org/fontconfig-user.html
有人对照着翻译了:http://cle.linux.org.tw/~edt1023/fontconfig/fontconfig-user.html
这里还有个简体中文版翻译的片段: http://hi.baidu.com/bullfire/blog/item/4efa27460a904a096b63e5a6.html
个人感觉翻译出来内容看着不如原文清楚,当然如果之前你们有任何基础直接看翻译的文章,可能更看不懂。建议原文译文一起看,来回的反复看效果会更好。
这里有几个例子,都是通过更改字体的配置解决一些实际问题的。http://lfeng.cn/2008/12/05/configure-intrepid-fonts-and-display/
Xorg:http://www.archlinux.it/wiki/index.php?title=Xorg_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
Xorg的字体配置:http://wiki.archlinux.org/index.php/Xorg%E5%AD%97%E4%BD%93%E9%85%8D%E7%BD%AE_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) 

其他一些好的文章:
字体设置:http://www.linuxsir.org/bbs/showthread.php?t=254314
介绍了好多基本的字体概念,入门者值得一看。
http://blog.chinaunix.net/u2/87783/showart.php?id=1769325
简单介绍了X系统的字体只是,以及工作的原理。如果你想了解Xwindow的字体系统,文章开头给出的三个参考连接非常值得一看。
DPI 详解: http://blog.chinaunix.net/u/28570/showart_352426.html
非常详细的讲解DPI这个概念的文章。强烈推荐。


Sunday Jan 18, 2009

如何让xterm 显示中文

默认安装好Xorg的xterm后,如果使用默认的配置很多中文的显示都是小方框,也就是无法显示。有2个方法可以暂时解决这个问题,不过都不是特别完美,只不过通过修改配置,或者改变了字号。估计是默认的点阵字体不全的原因,只有默写字号有比较全的字体(GB2312)。

方法1:
修改:/etc/X11/app-defaults/XTerm 中:
\*VT100.utf8Fonts.font:  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 
->  \*VT100.utf8Fonts.font5:  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
\*VT100.utf8Fonts.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
->  \*VT100.utf8Fonts.font: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
或者直接指定字体启动xterm:
xterm -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1

方法2:
1、编辑 ~/.Xresources 文件,加入
        xterm\*faceName:AR PL Uming CN
        xterm\*faceSize:12
2、执行  xrdb -load .Xresources
3、重启 xterm,问题解决了。

方法3:
1、编辑 ~/.Xresources 文件 :
    XTerm\*font: -misc-fixed-medium-r-normal-\*-18-120-100-100-c-90-iso10646-1
    XTerm\*wideFont: -misc-fixed-medium-r-normal-\*-18-120-100-100-c-180-iso10646-1
2、执行  xrdb -load .Xresources
3、重启 xterm,问题解决了。

 

Monday Oct 27, 2008

Check the OWfontpath's fontpath whether exist

From snv_97 some fonts have been removed. So, when you select some locales such like CCK, you will see garbage display on dtlogin screen. Actually not only dtlogin, all dt application such like dtterm will garbage display. What's root cause? Have a look /usr/dt/config/Xsetup, there is a fuction ADDFONTPATH_LOCAL() to add fonts path:
 ADDFONTPATH_LOCAL() {
        # Combine lines together to make arguments for the xset command
        FP=`/usr/bin/awk '
        BEGIN { fp="fp+ " }
        /\^[     ]\*$/ { fp=" +fp " ; continue }
        { printf("%s%s", fp, $0) ; fp="," } ' $1`
        if [ -n "$FP" ]; then

                eval "$XDIR/xset $FP"
        fi
}

If the font path which be passed by $1(OWfontpath) do not exist. xset will failed. To set X font path successfully, we should make sure all fonts path in OWfontpath exist. That means, if you remove some fonts path, they should be remove from OWfontpath too. Currently from snv_97 to snv_101, some the fonts path, which do not exist, are still listed in OWfontpath. This cause the issue I describe in header of this paper. I wrote a simple tool in python to check which fontpath have been removed, but still in OWfontpath. To display correctly, they need to be removed from OWfontpath.:

###############check_fontpath.py########################
#!/usr/bin/python
import os
import sys

def check_OWfontpath(OWfont):
    '''Check whether the entrie from $OWfont exists.
    '''
    bret = False
    for line in open(OWfont):
        if ',' in line:
            for path1 in line.split(','):
                if (not os.path.exists(path1.strip())):
                    print path1
                    if (bret==False):
                        bret = True
            continue
        if (not os.path.exists(line.strip())):
            print line,
            if (bret==False):
                bret = True
    return bret

def main():
    basedir = '/usr/openwin/lib/locale'
    owfontpath = 'OWfontpath'
    if (not os.path.exists(basedir)):
        print ' %s is not exist. ' % basedir
    for lc in os.listdir(basedir):
        lc_full = basedir + os.path.sep + lc
        if (os.path.isdir(lc_full) and (not os.path.islink(lc_full)) ):
            OWfont = lc_full + os.path.sep + owfontpath
            if (os.path.isfile(OWfont)):
                bRet = check_OWfontpath(OWfont)
                if (bRet==True):
                    print 'Above fonts path do not exist which listed by : %s' % OWfont  
                print   

if __name__ == '__main__':
    main()


Sunday Apr 13, 2008

More than 300 cool free English Fonts

TypeNow Support 305 cool free English fonts. They come from all kinds already exist such as the company logo or movie logo on the font, such as CNN, IBM,Shrek font. 

 

 

 


 

Sunday Jan 13, 2008

Indian language - Hindi font

When you hear language about some country, probably you will think the one-one relationship like:

China - Chinese

Japan - Japanese

England - English

...

But for Indian, it's special. For Indian , it does not means certain language. It means many language.

In Indian ,there are two language is official language, Hindi and English. Hindi is most popular and

base on North India language.  Beside these two main languages there still have many other Indian language.



Hindi Shree font:


Modular Systems from Pune, India, offers about 20 free truetype fonts for most Indic languages. The

fonts are all called Shree
something and appear complete. Covered are Assamese, Bengali, Hindi


(Devanagri), Gujarati, Kannada, Malayalam, Oriya, Punjabi, Tamil and
Telugu. In 1992, they made the

Malayalam fonts Shree-Mal-0501W, Shree-Mal-0502.



Here are some fonts download page.



Tamil: [ 'tæmil ] 
<script language="javascript">insertaudio( 'dgzzof','#e7f7f7');</script> 

n. 坦米尔人,坦米尔语

shree_tam_otf_0802.ttf

http://www.dinamalar.com/font.htm




Devanagari: [ ˌdeivə'nɑ:gəri ] 
<script language="javascript">insertaudio( 'nugzly','#e7f7f7');</script> 

n. 梵文字母, 天城体

Shree-Dev-0714

http://www.mmyvv.com/mmyvv-h/shree-dev.htm




Gujarati: 
<script language="javascript">insertaudio( 'qr4zjI','#e7f7f7');</script> 

古吉拉特语

http://www.sambhaav.com/

(http://mlcr.nagaokaut.ac.jp/main1/languages/gujarati.htm)




Kannada: [ 'kɑ:nədə ] 
<script language="javascript">insertaudio( '2przpz','#e7f7f7');</script> 

n. <印> 埃纳德语

Shree-Kan-0850

http://68.178.224.54/udayavani/help.asp?nosession=y&lang=2



Telugu: [ 'teləˌgu: ] 
<script language="javascript">insertaudio( '6gQzek','#e7f7f7');</script> 

泰卢固语(印度东部德拉维拉语言)

I only find shree_tel_0906

http://www.kamakoti.org/main/fonts.html



Reference:

http://en.wikipedia.org/wiki/Hindi


http://cg.scs.carleton.ca/~luc/telugu.html


http://ldc.upenn.edu/myl/hindi_fonts_and_conversions.html


http://ks.cn.yahoo.com/question/1406082812946.html
(Chinese)

About

williamxue

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today