Skip to content

Commit

Permalink
改进ditaa,以支持复杂的图. 还需要改进中文字体
Browse files Browse the repository at this point in the history
  • Loading branch information
erning committed Oct 11, 2011
1 parent 74cd8ec commit 65e5c99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/ditaa0_9_gbk.diff
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Index: src/org/stathissideris/ascii2image/text/TextGrid.java
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -1563,6 +1564,25 @@
@@ -1563,6 +1564,26 @@
byte[] bytes = row.getBytes();
row = new String(bytes, encoding);
}
Expand All @@ -77,7 +77,8 @@ Index: src/org/stathissideris/ascii2image/text/TextGrid.java
+ int q = 0;
+ for (int p = 0; p < row.length(); p++) {
+ char ch = row.charAt(p);
+ if (Character.isWhitespace(ch) || StringUtils.isOneOf(ch, boundaries)) {
+ if (StringUtils.isOneOf(ch, boundaries)
+ || StringUtils.isOneOf(ch, cornerChars)) {
+ if (q > 0) {
+ builder.append(StringUtils.repeatString(" ", q));
+ }
Expand Down
Binary file modified bin/ditaa0_9_gbk.jar
Binary file not shown.

0 comments on commit 65e5c99

Please sign in to comment.