Skip to content

Commit

Permalink
Generate part of hangul compatibility jamo
Browse files Browse the repository at this point in the history
  • Loading branch information
perillamint committed Aug 7, 2018
1 parent d1e4551 commit 03d2772
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dkb2bmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def renderChar(self, char):
jongIdx = char - 0x11A8 + 1
elif char >= 0x3131 and char <= 0x314E:
compatChoIdxLookup = [1, 2, 0, 3, 0, 0, 4, 5, 6, 0, 0, 0, 0 ,0, 0, 0, 7, 8, 9, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
block = compatChoIdxLookup[char - 0x3131]
choIdx = compatChoIdxLookup[char - 0x3131]
elif char >= 0x314F and char <= 0x3163:
jungIdx = char - 0x314F + 1
elif char >= 0xAC00 and char <= 0xD7A3:
Expand Down Expand Up @@ -185,5 +185,9 @@ def renderInRange(charRange, fontRenderer):
renderInRange((0x1161, 0x1175), hangulFontRenderer)
renderInRange((0x11A8, 0x11C2), hangulFontRenderer)

# Hangul Compat Jamo
renderInRange((0x3131, 0x314E), hangulFontRenderer)
renderInRange((0x314F, 0x3163), hangulFontRenderer)

# Hangul Syllables
renderInRange((0xAC00, 0xD7A3), hangulFontRenderer)

0 comments on commit 03d2772

Please sign in to comment.