Upgrade to Pro — share decks privately, control downloads, hide ads and more …

吉田を支える技術

58b40ae3b0db6cf0202a3802e9dd70fe?s=47 cockscomb
November 26, 2021

 吉田を支える技術

58b40ae3b0db6cf0202a3802e9dd70fe?s=128

cockscomb

November 26, 2021
Tweet

More Decks by cockscomb

Other Decks in Programming

Transcript

  1. ٢ాΛࢧ͑Δٕज़ গ͚ͩؒ͠Λ͓͍ͯ٢ా͕͖·͢ɻ

  2. גࣜձࣾ͸ͯͳ νʔϑΤϯδχΞ Ճ౻ਘथ JEDPDLTDPNC

  3. 8&# %#13&447PM (SBQI2-׬શΨΠυ

  4. ͸ͯͳಗ໊μΠΞϦʔ ໊લΛӅָͯ͘͠͠೔هɻ w໊લΛग़ͣ͞ʹ೔هΛॻ͚ΔαʔϏε w೥݄೔ͷϦϦʔε͔Β೥

  5. ͸ͯͳಗ໊μΠΞϦʔ ݟ͑ͳ͍ͱ͜Ζͷվળ͕ओ wίϯςφԽͯ͠"84&,4Ͱ࣮ߦ wεύϜରࡦͷվળ wΞϓϦέʔγϣϯϩάͷվળ w΄͔

  6. None
  7. ࣮Λݴ͏ͱ͸ͯͳ͸΋͏ͩΊͰ͢ɻ ಥવ͜Μͳ͜ͱݴͬͯ͝ΊΜͶɻ Ͱ΋ຊ౰Ͱ͢ɻ ̎ɺ̏೔ޙʹ΋ͷ͘͢͝ ௕͍૿ా͕͋Γ·͢ɻ ͦΕ͕ऴΘΓͷ߹ਤͰ͢ɻ ఔͳ͘େ͖Ίͷຊా͕དྷΔͷͰ ؾΛ͚ͭͯɻ ͦΕ͕΍ΜͩΒɺগ͚ͩؒ͠Λ͓͍ͯ ٢ా͕͖·͢ɻ

  8. ͸ͯͳಗ໊μΠΞϦʔʹͳ͔ͥසग़͢Δจࣈྻ ૿ా

  9. 

  10. None
  11. None
  12. None
  13. 

  14. ૿ాΛ٢ాʹ͍ͨ͠

  15. ૿ాΛ٢ాʹ͍ͨ͠ ૿ాΛ٢ాʹ͢Δํ๏ʹ͍ͭͯͷݕ౼ wαʔόͰT૿ా٢ాH wˠ(PPHMFCPUΛࠔΒͤͦ͏ wϑϩϯτΤϯυͰT૿ా٢ాH wˠ࠷ۙͷ(PPHMFCPU͸+BWB4DSJQUΛධՁ͢Δ wͳΜ͔͍͢͝ϋοΫ

  16. ͳΜ͔͍͢͝ϋοΫ

  17. 8FCϑΥϯτ

  18. ૿ా͕٢ాʹͳΔ8FCϑΥϯτΛ࡞Δ ϑΥϯτͷߏ଄ wϑΥϯτ͸ʮจࣈʯʹରԠ͢ΔʮάϦϑʯΛఏڙ͢Δ wจࣈ w6OJDPEFͷίʔυϙΠϯτ wॻهૉΫϥελ wάϦϑ͸จࣈͷܗ

  19. ૿ా͕٢ాʹͳΔ8FCϑΥϯτΛ࡞Δ ϑΥϯτʹؚ·ΕΔςʔϒϧͷྫ wHMZQςʔϒϧ wάϦϑ*%ʹରԠ͢ΔάϦϑͷܗঢ় wDNBQςʔϒϧ wίʔυϙΠϯτͱάϦϑ*%ͷରԠ

  20. ૿ా͕٢ాʹͳΔ8FCϑΥϯτΛ࡞Δ DNBQςʔϒϧΛॻ͖׵͑Δ 6  6  ૿ ٢

  21. ૿ా͕٢ాʹͳΔ8FCϑΥϯτΛ࡞Δ DNBQςʔϒϧΛॻ͖׵͑Δ 6  6  ૿ ٢

  22. GPOUUPPMT ϓϩάϥϚʔͳͷͰϑΥϯτΛϓϩάϥϜͰ࡞Δ w1ZUIPOͰϑΥϯτΛૢ࡞͢ΔϥΠϒϥϦ w(PPHMF΍"EPCF΋࢖͍ͬͯΔ

  23. def build_yoshida(base_font: ttLib.TTFont): masu = ord('૿') yoshi = ord('٢') cmap

    = base_font.getBestCmap() yoshi_cid = cmap[yoshi] head = base_font.get('head') fb = FontBuilder(head.unitsPerEm, isTTF=False) fb.setupGlyphOrder([".notdef", yoshi_cid]) fb.setupCharacterMap({masu: yoshi_cid})
  24. yoshi_glyph = base_font.getGlyphSet().get(yoshi_cid) yoshi_pen = T2CharStringPen(yoshi_glyph.width, None) yoshi_glyph.draw(yoshi_pen) char_strings =

    { ".notdef": ... , yoshi_cid: yoshi_pen.getCharString(), } fb.setupCFF( "Yoshida-Sans", {"FullName": "Yoshida-Sans"}, char_strings, {} )
  25. None
  26. ૿ా͕૿͑ͨˠ٢ా͕٢͑ͨ໰୊

  27. ૿ాͷͱ͖͚ͩ٢ాʹ͍ͨ͠

  28. ϦΨνϟʢ߹ࣈʣ ෳ਺ͷάϦϑͷฒͼΛҰͭͷάϦϑʹ͢Δ ffi f != != (BSBNPOE1SFNJFS1SP 'JSB$PEF ͔ͮΒ͖

  29. ϦΨνϟʢ߹ࣈʣ ෳ਺ͷจࣈͷฒͼΛҰͭͷάϦϑʹ͢Δ ૿ా ٢ా

  30. 0QFO5ZQFͷMJHBGFBUVSF (46#ςʔϒϧͰ࣮૷͞ΕΔ languagesystem DFLT dflt; feature liga { substitute cid13827

    cid27065 by cidmasuda; } liga;
  31. fb.addOpenTypeFeatures(f''' languagesystem DFLT dflt; feature liga {{ substitute {masu_cid} {da_cid}

    by {masuda_cid}; }} liga; ''') pen = T2CharStringPen(yoshi_glyph.width + da_glyph.width, None) yoshi_glyph.draw(pen) da_glyph.draw( TransformPen(pen, transform.Offset(yoshi_glyph.width)) )
  32. None
  33. λΠϜϥΠϯ  Šࢥ͍ͭ͘ Ϛωʔδϟʢ٢ాʣͱ߹ҙ Š։ൃ։࢝ ŠάϦϑͷஔ׵͕׬੒ Šํ਑Λมߋ ŠϦΨνϟ׬੒ ŠϓϧϦΫΤετ׬੒ ŠϚʔδ

    ٢ాʹ͢ΔࢫΛࣾ಺ؔ܎ऀʹใࠂ Š൓ө
  34. ٢ా͕͖·ͨ͠ w͓૽͕ͤ͠·ͨ͠ wϑΥϯτʹखΛೖΕΔͱ͍͏खஈ wͨ·ʹ໾ʹཱͭ w4*-0QFO'POU-JDFOTF

  35. ࣍ճɺେ͖Ίͷຊాɻޤ͏͝ظ଴