summaryrefslogtreecommitdiff
path: root/source/html
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-02-09 23:55:11 +0100
committerSebastian Rasmussen <sebras@gmail.com>2016-02-10 01:12:32 +0100
commit3204cbf1a986326e98c453818af69d17d0a4a193 (patch)
tree7ce668709f1fec90932c6621d52c377fb2d23f0e /source/html
parent93699403812c87a8d96d0029f37134cf86e86205 (diff)
downloadmupdf-3204cbf1a986326e98c453818af69d17d0a4a193.tar.xz
html: Consider CJK punctuation in line breaking algorithm
Diffstat (limited to 'source/html')
-rw-r--r--source/html/html-layout.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index 30b6e334..0a6e9970 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -152,6 +152,7 @@ static fz_html_flow *split_flow(fz_context *ctx, fz_pool *pool, fz_html_flow *fl
static int iscjk(int c)
{
+ if (c >= 0x3000 && c <= 0x303F) return 1; /* CJK Symbols and Punctuation */
if (c >= 0x3200 && c <= 0x9FFF) return 1; /* CJK Blocks */
if (c >= 0xFF00 && c <= 0xFFEF) return 1; /* Halfwidth and Fullwidth Forms */
return 0;
@@ -165,8 +166,8 @@ static int not_at_bol(int cat, int c)
if (c == ']' || c == 0xFF3D) return 1;
if (c == '}' || c == 0xFF5D) return 1;
if (c == '>' || c == 0xFF1E) return 1;
- if (c == ',' || c == 0xFF0C) return 1;
- if (c == '.' || c == 0xFF0E) return 1;
+ if (c == ',' || c == 0xFF0C || c == 0x3001) return 1;
+ if (c == '.' || c == 0xFF0E || c == 0x3002) return 1;
if (c == ':' || c == 0xFF1A) return 1;
if (c == ';' || c == 0xFF1B) return 1;
if (c == '?' || c == 0xFF1F) return 1;