GTK 다수의 기본 글꼴값 설정

highwind의 이미지

gtk-font-name = "Tahoma 8"

GTK의 기본글꼴을 설정 하기 위해서 위와 같이 하는것으로 알고 있고 잘 됩니다.
하지만 이렇게 하면 multibyte character들은 (예: 한글) 지맘대로 글꼴을 뽑아 쓰는거 같습니다.
Multibyte character들의 글꼴을 따로 설정할수 있는 방법이 있나요?
(gvim에선 그런 옵션이 있던데 program specific하지 않고 gtk에서 전체적으로 말이죠...)

참고로 전 gentoo+fluxbox를 쓰고 있습니다.

Prentice의 이미지

Fontconfig의 글꼴 설정 파일에서 Tahoma에 다른 글꼴을 추가로 bind하시는 수가 있습니다.

highwind의 이미지

검은해 wrote:
Fontconfig의 글꼴 설정 파일에서 Tahoma에 다른 글꼴을 추가로 bind하시는 수가 있습니다.

http://fontconfig.org/fontconfig-user.html
Binding하는 옵션은 못찾겠습니다.
어떻게 하는지 알려주실 수 있을까요?

=====================================
http://timothylive.net

마잇의 이미지

	<alias>
		<family>serif</family>
		<prefer>
			<family>Bitstream Vera Serif</family>
			<family>Times New Roman</family>
			<family>Thorndale AMT</family>
			<family>Luxi Serif</family>
			<family>Nimbus Roman No9 L</family>
			<family>Times</family>
			<family>Frank Ruehl</family>
			<family>UnBatang</family>
			<family>Kochi Mincho</family>
			<family>AR PL SungtiL GB</family>
			<family>AR PL Mingti2L Big5</family>
			<family>MS 明朝</family>
			<family>FreeSerif</family>
		</prefer>
	</alias>

/etc/fonts/fonts.conf 보시면 <prefer> 태그가 들어가는 저런 부분이 있을겁니다.
글꼴선택에서 serif를 선택하면 영문글꼴은 Bitstream Vera Serif 글꼴과 처음으로 매칭되고 한글글꼴은 UnBatang과 처음으로 매칭됩니다. 그래서 영문글자는 Bitstream으로, 한글문자는 UnBatang으로 표시됩니다. serif대신 Bitstream으로 직접 선택해도 마찬가지구요. 원래는 Baekmuk Batang이었는데 제가 수정한 겁니다. fonts.conf에서 위 내용을 따와서 /etc/fonts/local.conf나 ~/.fonts.conf에서 수정하시는게 좋습니다. /etc/fonts.conf는 패키지 업그레이드시에 덮어씌워집니다. serif부분만 보여드렸는데 sans-serif나 monospace도 마찬가지로 설정하시면 편합니다.

기본적인 글꼴은 이렇게 설정하고 쓰면 되는데 특정글꼴만 바인딩을 변경하고 싶을때도 있지요. 저 상태에서 Luxi Serif를 선택하면 UnBatang과 매치가 되지만 Luxi Serif만 Baekmuk Batang과 매치되기를 원한다 하면 이렇게 합니다.
그놈코리아 위키를 참고해서 응용해봤습니다.
http://gnome.or.kr/wiki/FontConfig

    <match target="pattern">
        <test name="family">
            <string>Luxi Serif</string>
        </test>
        <edit name="family" mode="append" binding="strong">
            <string>Baekmuk Batang</string>
        </edit>
    </match>

iolo님 위키에 올려져 있는 fonts.conf에서 발췌한 부분입니다.
http://hellocity.net/~iolo/moniwiki/wiki.php/FontConfig
	<!-- associates "Hangang" for terminal fonts -->
	<!--*-->
	<match target="pattern">
		<test name="family">
			<string>Andale Mono</string>
			<string>Anonymous</string>
			<string>Excalibur Monospace</string>
			<string>LucidaTypewriter</string>
			<string>Monaco</string>
			<string>NetTerm ANSI</string>
			<string>NetTerm OEM</string>
			<string>ProFontWindows</string>
			<string>QuickType Mono</string>
			<string>Terminus</string>
			<string>Terminal</string>
			<string>Smooth</string>
			<string>Smoothansi</string>
		</test>
		<edit name="family" mode="append" binding="strong"><string>Hangang</string></edit>
	</match>
	<!--*-->

fonts.conf 설정시에 자세한 문법은 처음 올려주신분의 링크를 참고하시는게 좋을것 같네요.


--
마잇

정태영의 이미지

highwind wrote:
검은해 wrote:
Fontconfig의 글꼴 설정 파일에서 Tahoma에 다른 글꼴을 추가로 bind하시는 수가 있습니다.

http://fontconfig.org/fontconfig-user.html
Binding하는 옵션은 못찾겠습니다.
어떻게 하는지 알려주실 수 있을까요?

append prepend assign 이 세가지 옵션과 관련이 있습니다 ... 대강 뜻을 보면 어떻게 동작하실지는 아실 듯 싶고 사용 법은 위의 예제들을 보시면 쉽게 짐작하실거라 믿습니다.

아 그리고 fonts.conf 에서 alias 되어 있는걸 고치기 보단... local.conf 에서 Sans Serif, Serif, Monospace 등의 기본 형식에 match test edit 등의 방식을 이용해서 append 하는 방법을 사용해 보시는게...

(예전에 그렇게 썼었던 거 같은데 요 근래 리눅스를 사용하지 않고 있어서 정확하겐 말씀을 드리기가 힘드네요 :) )

오랫동안 꿈을 그리는 사람은 그 꿈을 닮아간다...

http://mytears.org ~(~_~)~
나 한줄기 바람처럼..

highwind의 이미지

오호... 많은 도움이 되었습니다. 감사합니다!! ^^;;;

=====================================
http://timothylive.net

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.