Skip to content

Commit

Permalink
use the imgfont code when the mapping is missing from sym.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
gugod committed Feb 6, 2013
1 parent c412fa4 commit 8d3a59d
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 33 deletions.
24 changes: 12 additions & 12 deletions data/radical-strokes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@
""
],
"12" : [
null,
"97e0",
"",
"",
"",
Expand Down Expand Up @@ -2633,7 +2633,7 @@
"",
"",
"",
null
"fef6"
],
"4" : [
"",
Expand Down Expand Up @@ -2919,7 +2919,7 @@
""
],
"0" : [
null
"9ce9"
],
"2" : [
""
Expand Down Expand Up @@ -4220,7 +4220,7 @@
""
],
"8" : [
null,
"8fe8",
"",
"",
"",
Expand Down Expand Up @@ -7262,7 +7262,7 @@
],
"6" : [
"",
null,
"8fda",
"",
"",
"",
Expand Down Expand Up @@ -7649,10 +7649,10 @@
"",
"",
"",
null
"fec5"
],
"12" : [
null,
"8fa3",
"",
"",
"",
Expand Down Expand Up @@ -7731,7 +7731,7 @@
],
"4" : [
"",
null,
"9769",
"",
"",
"",
Expand All @@ -7752,7 +7752,7 @@
"",
"",
"",
null
"fec6"
],
"19" : [
"",
Expand Down Expand Up @@ -7782,7 +7782,7 @@
""
],
"5" : [
null,
"95ef",
"",
"",
"",
Expand Down Expand Up @@ -10702,7 +10702,7 @@
""
],
"18" : [
null,
"9058",
""
],
"16" : [
Expand Down Expand Up @@ -12685,7 +12685,7 @@
"",
"",
"",
null
"fdeb"
],
"4" : [
"",
Expand Down
84 changes: 64 additions & 20 deletions data/reverse-radical-strokes.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"strokes" : "9",
"radical" : "140"
},
"" : {
"strokes" : "8",
"radical" : "94"
},
"剽" : {
"strokes" : "11",
"radical" : "18"
Expand Down Expand Up @@ -1187,6 +1183,10 @@
"strokes" : "8",
"radical" : "31"
},
"97e0" : {
"strokes" : "12",
"radical" : "163"
},
"聞" : {
"strokes" : "8",
"radical" : "128"
Expand Down Expand Up @@ -3507,6 +3507,10 @@
"strokes" : "7",
"radical" : "64"
},
"9ce9" : {
"strokes" : "0",
"radical" : "17"
},
"垡" : {
"strokes" : "6",
"radical" : "32"
Expand Down Expand Up @@ -3631,6 +3635,10 @@
"strokes" : "5",
"radical" : "128"
},
"8fa3" : {
"strokes" : "12",
"radical" : "167"
},
"剁" : {
"strokes" : "6",
"radical" : "18"
Expand Down Expand Up @@ -3995,6 +4003,10 @@
"strokes" : "9",
"radical" : "122"
},
"9058" : {
"strokes" : "18",
"radical" : "75"
},
"弢" : {
"strokes" : "5",
"radical" : "57"
Expand Down Expand Up @@ -5251,6 +5263,10 @@
"strokes" : "16",
"radical" : "40"
},
"95ef" : {
"strokes" : "5",
"radical" : "167"
},
"腹" : {
"strokes" : "9",
"radical" : "130"
Expand Down Expand Up @@ -10507,6 +10523,10 @@
"strokes" : "5",
"radical" : "170"
},
"9769" : {
"strokes" : "4",
"radical" : "167"
},
"忞" : {
"strokes" : "4",
"radical" : "61"
Expand Down Expand Up @@ -10671,6 +10691,10 @@
"strokes" : "15",
"radical" : "64"
},
"fef6" : {
"strokes" : "8",
"radical" : "86"
},
"疑" : {
"strokes" : "9",
"radical" : "103"
Expand Down Expand Up @@ -10971,6 +10995,10 @@
"strokes" : "6",
"radical" : "9"
},
"8fda" : {
"strokes" : "6",
"radical" : "142"
},
"捯" : {
"strokes" : "8",
"radical" : "64"
Expand Down Expand Up @@ -19195,6 +19223,10 @@
"strokes" : "13",
"radical" : "64"
},
"fec6" : {
"strokes" : "4",
"radical" : "167"
},
"篡" : {
"strokes" : "10",
"radical" : "118"
Expand Down Expand Up @@ -21711,14 +21743,14 @@
"strokes" : "14",
"radical" : "115"
},
"踧" : {
"strokes" : "8",
"radical" : "157"
},
"漩" : {
"strokes" : "11",
"radical" : "85"
},
"踧" : {
"strokes" : "8",
"radical" : "157"
},
"紳" : {
"strokes" : "5",
"radical" : "120"
Expand Down Expand Up @@ -32751,6 +32783,10 @@
"strokes" : "12",
"radical" : "149"
},
"fdeb" : {
"strokes" : "8",
"radical" : "94"
},
"慱" : {
"strokes" : "11",
"radical" : "61"
Expand Down Expand Up @@ -32967,6 +33003,10 @@
"strokes" : "11",
"radical" : "163"
},
"8fe8" : {
"strokes" : "8",
"radical" : "140"
},
"泙" : {
"strokes" : "5",
"radical" : "85"
Expand Down Expand Up @@ -33643,14 +33683,14 @@
"strokes" : "2",
"radical" : "2"
},
"畿" : {
"strokes" : "10",
"radical" : "102"
},
"漾" : {
"strokes" : "11",
"radical" : "85"
},
"畿" : {
"strokes" : "10",
"radical" : "102"
},
"網" : {
"strokes" : "8",
"radical" : "120"
Expand Down Expand Up @@ -34239,14 +34279,14 @@
"strokes" : "3",
"radical" : "60"
},
"纏" : {
"strokes" : "15",
"radical" : "120"
},
"漢" : {
"strokes" : "11",
"radical" : "85"
},
"纏" : {
"strokes" : "15",
"radical" : "120"
},
"顑" : {
"strokes" : "9",
"radical" : "181"
Expand Down Expand Up @@ -36579,6 +36619,10 @@
"strokes" : "2",
"radical" : "72"
},
"fec5" : {
"strokes" : "9",
"radical" : "167"
},
"居" : {
"strokes" : "5",
"radical" : "44"
Expand Down Expand Up @@ -36935,14 +36979,14 @@
"strokes" : "12",
"radical" : "120"
},
"綵" : {
"strokes" : "8",
"radical" : "120"
},
"漠" : {
"strokes" : "11",
"radical" : "85"
},
"綵" : {
"strokes" : "8",
"radical" : "120"
},
"迴" : {
"strokes" : "6",
"radical" : "162"
Expand Down
7 changes: 6 additions & 1 deletion process-part.pl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ sub parse_part_file {
my $strokes = strokes_to_int($strokes_zh);
my $char = ($_->attrs("href") =~ (m!'(.+)'!))[0]; # marmot ?
if (length($char) > 1) {
$char = $sym{$char};
if ($sym{$char}) {
$char = $sym{$char};
}
else {
say STDERR "imgFont $char is missing from sym.txt";
}
}
push @{$stroke_to_chars->{$strokes}}, $char;
}
Expand Down

0 comments on commit 8d3a59d

Please sign in to comment.