This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* Re: https://twitter.com/llaisdy/status/1558536851560054786?s=20&t=us8J3LvoJTlwVwod5bOqeQ *) | |
| (* Use this if using the REPL, otherwise use dune to build with the library dependency *) | |
| #require "uutf";; | |
| (* Converts an array of ints (Unicode graphemes) into a UTF-8 encoded string. *) | |
| let utf8_to_string uchars = | |
| let buf = Buffer.create (2 * Array.length uchars) in | |
| Array.iter (fun uchar -> Uutf.Buffer.add_utf_8 buf (Uchar.of_int uchar)) uchars; | |
| Buffer.contents buf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % upLaTeX での pxbabel はCJK言語の切替を | |
| % J20,J21,J22,J23,J30,J31,J32,J33 | |
| % という"和文エンコーディング"の切替で実現している. | |
| % これらのエンコーディングに対応する和文フォントは | |
| % pLaTeX の既定である mc, gt のファミリにのみ提供される. | |
| % | |
| % 一方で, otf パッケージ(noreplace非指定)は, 和文の | |
| % 総称ファミリの既定値(\mcdefault/\gtdefault)を | |
| % "hmc"/"hgt" に変更する. | |
| % 日本語の種々の"素敵な"フォントはこのファミリに |