浏览代码

force a column alignment after each column containing a fullwidth character.

tags/v0.99.beta17
Ben Wiley Sittler bsittler 17 年前
父节点
当前提交
e434549a4d
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      caca/codec/export.c

+ 6
- 1
caca/codec/export.c 查看文件

@@ -503,6 +503,7 @@ static void *export_html3(caca_canvas_t const *cv, size_t *bytes)
for(y = 0; y < cv->height; y++) for(y = 0; y < cv->height; y++)
{ {
uint32_t *lineattr = cv->attrs + y * cv->width; uint32_t *lineattr = cv->attrs + y * cv->width;
uint32_t *linechar = cv->chars + y * cv->width;


for(x = 1; x < cv->width; x++) for(x = 1; x < cv->width; x++)
if((! (cell_boundary_bitmap if((! (cell_boundary_bitmap
@@ -511,7 +512,9 @@ static void *export_html3(caca_canvas_t const *cv, size_t *bytes)
: :
has_multi_cell_row)) has_multi_cell_row))
&& &&
((caca_attr_to_ansi_bg(lineattr[x - 1])
((linechar[x - 1] == CACA_MAGIC_FULLWIDTH)
||
(caca_attr_to_ansi_bg(lineattr[x - 1])
!= !=
caca_attr_to_ansi_bg(lineattr[x])) caca_attr_to_ansi_bg(lineattr[x]))
|| ||
@@ -569,6 +572,8 @@ static void *export_html3(caca_canvas_t const *cv, size_t *bytes)
|| ||
(cv->height == 1)) (cv->height == 1))
&& &&
(linechar[x + len - 1] != CACA_MAGIC_FULLWIDTH)
&&
(caca_attr_to_ansi_bg(lineattr[x + len]) (caca_attr_to_ansi_bg(lineattr[x + len])
== ==
caca_attr_to_ansi_bg(lineattr[x])) caca_attr_to_ansi_bg(lineattr[x]))


正在加载...
取消
保存