skishore / makemeahanzi

Free, open-source Chinese character data
https://www.skishore.me/makemeahanzi/
Other
1.83k stars 465 forks source link

Strokes for 為 in graphics.txt are actually 爲 #36

Open parkin opened 6 years ago

parkin commented 6 years ago

In graphics.txt, the strokes for 為 actually produce the archaic 爲. So the character for this entry should be updated to 爲, and a new entry should be created for 為. (the decimal for 為 is 28858, take a look at 28858.svg)

I love this project btw, thanks for all of your hard work! :smile:

skishore commented 6 years ago

Thanks for the report! I'll take a look, but there might be a problem - since Make Me a Hanzi is based on a font, if the glyph is wrong in the font, it'll be wrong in this dataset with no easy way to correct it. I'm afraid that might have happened here.

On Fri, Jun 1, 2018 at 12:58 AM, Will notifications@github.com wrote:

In graphics.txt, the strokes for 為 actually produce the archaic 爲. So the character for this entry should be updated to 爲, and a new entry should be updated to 為.

I love this project btw, thanks for all of your hard work! 😄

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/skishore/makemeahanzi/issues/36, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmE0OPPZ9Jd0PDewu2VTiltjpRcsiOPks5t4MoKgaJpZM4UWGxh .

parsimonhi commented 5 years ago

Here is a possible entry for 為 (extracted from an experimental version of animCJK):

{"character":"為","strokes":["M315,643C327,630 339,614 352,597C358,589 367,584 377,582C383,582 389,585 393,593C397,601 397,615 394,634C391,650 364,667 316,687C306,691 299,693 296,691C292,690 291,684 291,676C291,669 299,659 315,643Z","M573,786C549,812 513,824 501,820C492,818 489,811 492,801C505,758 465,657 389,507C359,450 333,409 326,396C264,297 241,263 68,52C64,48 60,45 59,41C54,35 56,32 64,32C74,32 94,41 121,66C190,133 242,188 289,249L314,282C338,315 361,348 384,384L408,422C422,445 435,469 449,494C489,569 519,637 526,652C537,676 560,726 575,746C588,766 582,776 573,786Z","M553,446C561,465 569,487 576,511C578,519 578,527 574,531C568,536 558,536 546,534C338,501 320,472 255,479C129,494 174,528 260,529C316,531 467,555 549,577C579,586 618,581 664,540C674,531 672,515 659,506C644,497 628,483 614,459Z","M621,333C631,362 639,387 644,408C645,415 644,421 642,422C623,434 537,421 384,384L408,422C468,429 498,435 553,446L614,459C640,465 658,468 672,460C706,440 728,426 731,415C733,408 729,401 723,395C711,384 698,365 684,339Z","M752,-95C747,-95 743,-89 739,-82C727,-60 698,-30 653,12C644,21 641,28 641,33C641,38 646,38 658,35C677,30 699,30 722,26C747,22 764,31 773,60C787,108 794,175 797,261C797,281 796,293 793,296C788,301 783,304 775,303C590,297 433,272 348,248C320,241 301,243 289,249L314,282C356,288 397,298 442,306C515,321 551,327 621,333L684,339C730,344 762,350 781,355C800,362 817,359 835,348C861,333 879,319 892,308C900,301 900,294 887,279C877,268 871,251 868,229C845,106 828,29 817,-6C808,-30 796,-53 781,-74C770,-87 763,-95 755,-95Z","M284,152C292,106 301,72 316,54C321,47 331,47 340,51C347,55 354,62 357,72C364,98 348,133 312,176C305,184 299,189 293,190C289,191 285,188 283,181C280,175 281,165 284,152Z","M398,189C415,146 431,120 449,114C457,112 466,115 472,125C475,133 475,145 472,158C466,179 444,196 408,213C403,216 399,214 396,206C393,202 395,196 398,189Z","M504,210C526,169 545,145 562,140C570,138 578,142 583,153C586,161 585,172 580,184C571,207 547,223 512,234C506,236 503,234 501,226C499,222 500,217 504,210Z","M634,196C647,180 660,161 675,140C681,132 688,126 697,124C703,123 709,127 713,133C717,141 719,154 718,171C717,184 709,197 692,208C652,235 627,247 620,243C616,242 614,237 614,229C613,223 621,212 634,196Z"],"medians":[[[301,687],[382,586]],[[500,813],[538,762],[393,453],[258,251],[65,38]],[[185,511],[295,508],[572,558],[623,524],[562,453]],[[392,390],[652,443],[686,406],[657,350],[628,339]],[[298,252],[545,304],[780,330],[821,318],[848,286],[780,-1],[743,-41],[649,33]],[[293,182],[337,56]],[[405,205],[458,119]],[[509,226],[577,149]],[[623,234],[683,179],[702,130]]]}

This version has no "brush effect". But it is not complicated to add it since you did the job for all the other characters.

You can check the shape produced by this entry at http://gooo.free.fr/animCJK/svgsZhMod/28858.svg

Note that you cannot import svg files as is from animCJK project because they have not the same format as in MakeMeAHanzi. But you can import entry from graphicsZhHans.txt of animCJK (see https://github.com/parsimonhi/animCJK) as is because they have the same format as in MakeMeAHanzi (excepting the brush effet which is not implemented in graphicsZhHans.txt of animCJK). 為 is not in the 7000 characters stored in graphicsZhHans.txt of the official version of animCJK, so this is the reason when i extracted it from an experimental version not published in gitHub.

Hope it helps!

skishore commented 5 years ago

Where did you get the outlines here from? Were they in one of the two fonts or did you create them from scratch!

On Wed, Oct 10, 2018 at 1:53 PM parsimonhi notifications@github.com wrote:

Here is a possible entry for 為 (extracted from an experimental version of animCJK):

{"character":"為","strokes":["M315,643C327,630 339,614 352,597C358,589 367,584 377,582C383,582 389,585 393,593C397,601 397,615 394,634C391,650 364,667 316,687C306,691 299,693 296,691C292,690 291,684 291,676C291,669 299,659 315,643Z","M573,786C549,812 513,824 501,820C492,818 489,811 492,801C505,758 465,657 389,507C359,450 333,409 326,396C264,297 241,263 68,52C64,48 60,45 59,41C54,35 56,32 64,32C74,32 94,41 121,66C190,133 242,188 289,249L314,282C338,315 361,348 384,384L408,422C422,445 435,469 449,494C489,569 519,637 526,652C537,676 560,726 575,746C588,766 582,776 573,786Z","M553,446C561,465 569,487 576,511C578,519 578,527 574,531C568,536 558,536 546,534C338,501 320,472 255,479C129,494 174,528 260,529C316,531 467,555 549,577C579,586 618,581 664,540C674,531 672,515 659,506C644,497 628,483 614,459Z","M621,333C631,362 639,387 644,408C645,415 644,421 642,422C623,434 537,421 384,384L408,422C468,429 498,435 553,446L614,459C640,465 658,468 672,460C706,440 728,426 731,415C733,408 729,401 723,395C711,384 698,365 684,339Z","M752,-95C747,-95 743,-89 739,-82C727,-60 698,-30 653,12C644,21 641,28 641,33C641,38 646,38 658,35C677,30 699,30 722,26C747,22 764,31 773,60C787,108 794,175 797,261C797,281 796,293 793,296C788,301 783,304 775,303C590,297 433,272 348,248C320,241 301,243 289,249L314,282C356,288 397,298 442,306C515,321 551,327 621,333L684,339C730,344 762,350 781,355C800,362 817,359 835,348C861,333 879,319 892,308C900,301 900,294 887,279C877,268 871,251 868,229C845,106 828,29 817,-6C808,-30 796,-53 781,-74C770,-87 763,-95 755,-95Z","M284,152C292,106 301,72 316,54C321,47 331,47 340,51C347,55 354,62 357,72C364,98 348,133 312,176C305,184 299,189 293,190C289,191 285,188 283,181C280,175 281,165 284,152Z","M398,189C415,146 431,120 449,114C457,112 466,115 472,125C475,133 475,145 472,158C466,179 444,196 408,213C403,216 399,214 396,206C393,202 395,196 398,189Z","M504,210C526,169 545,145 562,140C570,138 578,142 583,153C586,161 585,172 580,184C571,207 547,223 512,234C506,236 503,234 501,226C499,222 500,217 504,210Z","M634,196C647,180 660,161 675,140C681,132 688,126 697,124C703,123 709,127 713,133C717,141 719,154 718,171C717,184 709,197 692,208C652,235 627,247 620,243C616,242 614,237 614,229C613,223 621,212 634,196Z"],"medians":[[[301,687],[382,586]],[[500,813],[538,762],[393,453],[258,251],[65,38]],[[185,511],[295,508],[572,558],[623,524],[562,453]],[[392,390],[652,443],[686,406],[657,350],[628,339]],[[298,252],[545,304],[780,330],[821,318],[848,286],[780,-1],[743,-41],[649,33]],[[293,182],[337,56]],[[405,205],[458,119]],[[509,226],[577,149]],[[623,234],[683,179],[702,130]]]}

This version has no "brush effect". But it is not complicated to add it since you did the job for all the other characters.

You can check the shape produced by this entry at http://gooo.free.fr/animCJK/svgsZhMod/28858.svg

Note that you cannot import svg files as is from animCJK project because they have not the same format as in MakeMeAHanzi. But you can import entry from graphicsZhHans.txt of animCJK (see https://github.com/parsimonhi/animCJK) as is because they have the same format as in MakeMeAHanzi (excepting the brush effet which is not implemented in graphicsZhHans.txt of animCJK). 為 is not in the 7000 characters stored in graphicsZhHans.txt of the official version of animCJK, so this is the reason when i extracted it from an experimental version not published in gitHub.

Hope it helps!

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/skishore/makemeahanzi/issues/36#issuecomment-428668583, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmE0A6Lhid2SoS75LLn0RyZAs-MBSNyks5ujjQugaJpZM4UWGxh .

parsimonhi commented 5 years ago

I used inkscape (a svg editor) to modify the outlines of 爲 (coming from MakeMeAHanzi).

I used the same method to create or modify between two and three thousand characters that are in animCJK but not in MakeMeAHanzi, or not in MakeMeAHanzi as is. Sometimes, I got some components from several characters and assembled them to create a new character. In some rare cases, I used Inkscape to transform a PNG image of a character present in Arpic fonts but missing in MakeMaAHanzi. Beside this, I also used a simple text editor to modify stroke orders when different in Japanese, Chinese or Taiwanese. Finally, I used a tool in php/Javascript that I wrote myself to compute medians automatically providing the shape of the character and a starting point for each stroke (not published in animCJK project at the moment: need some improvements to be usable easily by anybody).

In all cases, the only source fonts were Arpic fonts (or MakeMaAHanzi which is using Arpic fonts). So there is no license problem behind this.

parsimonhi commented 5 years ago

Not that 為 is not in the official version of animCJK because it is a traditional chinese character, and is not commonly used in japanese. The official version of animCJK contains only commonly used simplified chinese and japanese characters at the moment. See http://gooo.free.fr/animCJK/all.php to have an overview of the experimental version of animCJK.