tdf#125620 add Korean Hangul Jamo codepoint ranges

In LibreOffice's Korean Hangul part, It check Korean code points only 3 part ranges.
(such as,
U+AC00 - U+D7AF - Hangul Syllables
U+3130 - U+318F - Hangul Compatibility Jamo
U+1100 - U+11FF - Hangul Jamo )

So, add Korean Hangul jamo code point ranges.
such as,
U+A960 - U+A97F: Hangul Jamo Extended-A
U+D7B0 - U+D7FF: Hangul Jamo Extended-B

Below is Korean Hangul Jamo and Syllables code point ranges on Unicode Consortium
Hangul Jamo (Range: U+1100 - U+11FF)
http://www.unicode.org/charts/PDF/U1100.pdf
Hangul Jamo Extended-A (Range: U+A960 - U+A97F)
http://www.unicode.org/charts/PDF/UA960.pdf
Hangul Jamo Extended-B (Range: U+D7B0 - U+D7FF)
http://www.unicode.org/charts/PDF/UD7B0.pdf
Hangul Compatibility Jamo (Range: U+3130 - U+318F)
http://www.unicode.org/charts/PDF/U3130.pdf
Hangul Syllables (Range: U+AC00 - U+D7AF)
http://www.unicode.org/charts/PDF/UAC00.pdf

Change-Id: I65da4d9c6c43e01eb61f2e420faf1ad6cd986d86
Reviewed-on: https://gerrit.libreoffice.org/73309
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
DaeHyun Sung
2019-06-01 22:51:21 +09:00
committed by Caolán McNamara
parent c22d547438
commit d9a31b8e16
3 changed files with 7 additions and 1 deletions

View File

@@ -89,7 +89,9 @@ BreakIterator_CJK::getWordBoundary( const OUString& text, sal_Int32 anyPos,
namespace {
bool isHangul( sal_Unicode cCh )
{
return (cCh >= 0xAC00 && cCh <= 0xD7AF) || (cCh >= 0x1100 && cCh <= 0x11FF);
return (cCh >= 0xAC00 && cCh <= 0xD7AF) || (cCh >= 0x1100 && cCh <= 0x11FF) ||
(cCh >= 0xA960 && cCh <= 0xA97F) || (cCh >= 0xD7B0 && cCh <= 0xD7FF) ||
(cCh >= 0x3130 && cCh <= 0x318F);
}
}

View File

@@ -42,6 +42,8 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
// korean
if ( ((ch >= 0xAC00) && (ch <= 0xD7AF)) ||
((ch >= 0xA960) && (ch <= 0xA97F)) ||
((ch >= 0xD7B0) && (ch <= 0xD7FF)) ||
((ch >= 0x3130) && (ch <= 0x318F)) ||
((ch >= 0x1100) && (ch <= 0x11FF)) )
return ImplFontAttrs::CJK|ImplFontAttrs::CJK_KR;

View File

@@ -67,6 +67,8 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
// korean
if ( ((ch >= 0xAC00) && (ch <= 0xD7AF)) ||
((ch >= 0xA960) && (ch <= 0xA97F)) ||
((ch >= 0xD7B0) && (ch <= 0xD7FF)) ||
((ch >= 0x3130) && (ch <= 0x318F)) ||
((ch >= 0x1100) && (ch <= 0x11FF)) )
return ImplFontAttrs::CJK|ImplFontAttrs::CJK_KR;