Created
July 16, 2014 01:22
-
-
Save ganadist/c2f8a74cc1304ebc2f4e to your computer and use it in GitHub Desktop.
source sans hangul test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
p {font-family: "Noto Sans Korean"; } | |
</style> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<p>Syllable: 아름다<font color="red">운 한</font>글</p> | |
<p>Jamo: 아름ᄃ<font color="red">ᅡ운 ᄒ</font>ᆞᆫ글</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
from gi.repository import Pango, Gtk | |
TEXT1 = """아름<span color="red">다운 한</span>글""" | |
TEXT2 = u"""\u110b\u1161\u1105\u1173\u11b7\u1103<span color="red">\u1161\u110b\u116e\u11ab\u1112</span>\u119e\u11ab\u1100\u1173\u11af""" | |
if __name__ == '__main__': | |
win = Gtk.Window() | |
box = Gtk.VBox() | |
win.add(box) | |
for text in (TEXT1, TEXT2): | |
label = Gtk.Label() | |
box.add(label) | |
label.set_markup(text) | |
fontDesc = Pango.FontDescription.from_string("Noto Sans Korean 32") | |
label.get_layout().set_font_description(fontDesc) | |
win.set_default_size(250, 200) | |
win.show_all() | |
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