Skip to content

Instantly share code, notes, and snippets.

@ganadist
Created April 7, 2013 04:30
Show Gist options
  • Save ganadist/5329033 to your computer and use it in GitHub Desktop.
Save ganadist/5329033 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from gi.repository import Pango, Gtk
TEXT = """<span color="red">\xe1\x84\x80\xe1\x85\xa1\xe1\x84\x82</span>\xe1\x85\xa1\xe1\x86\xab\xe1\x84\x8d\xe1\x85\xa9\xe1\x84\x81\xe1\x85\xa9\xe1\x84\x85\xe1\x85\xa6\xe1\x86\xba ganachoco"""
# ㄱ ㅏ ㄴ ㅏ ㄴ ㅉ ㅗ ㄲ ㅗ ㄹ ㅔ ㅅ
if __name__ == '__main__':
win = Gtk.Window()
label = Gtk.Label()
win.add(label)
win.set_default_size(400, 300)
win.show_all()
label.set_markup(TEXT)
fontDesc = Pango.FontDescription.from_string("Undotum 32")
label.get_layout().set_font_description(fontDesc)
win.connect('destroy', Gtk.main_quit)
Gtk.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment