When running the below script on Mac, Japanese characters got garbled. I found a similar issue https://github.com/quanteda/quanteda/issues/1317 and followed the suggestion but it didn't solve the problem.
> extrafont::fonts()
[1] ".SF Compact Rounded" ".Keyboard" ".New York" ".SF Compact" "System Font"
[6] ".SF NS Mono" ".SF NS Rounded" "Academy Engraved LET" "Andale Mono" "Apple Braille"
[11] "AppleMyungjo" "Arial Black" "Arial" "Arial Narrow" "Arial Rounded MT Bold"
[16] "Arial Unicode MS" "Bodoni Ornaments" "Bodoni 72 Smallcaps" "" "Brush Script MT"
[21] "Comic Sans MS" "Courier New" "DIN Alternate" "DIN Condensed" "Georgia"
[26] "Impact" "Khmer Sangam MN" "Lao Sangam MN" "Luminari" "Microsoft Sans Serif"
[31] "Noto Sans Adlam" "Noto Sans Avestan" "Noto Sans Bamum" "Noto Sans Bassa Vah" "Noto Sans Batak"
[36] "Noto Sans Bhaiksuki" "Noto Sans Brahmi" "Noto Sans Buginese" "Noto Sans Buhid" "Noto Sans Carian"
[41] "Noto Sans CaucAlban" "Noto Sans Chakma" "Noto Sans Cham" "Noto Sans Coptic" "Noto Sans Cuneiform"
[46] "Noto Sans Cypriot" "Noto Sans Duployan" "Noto Sans EgyptHiero" "Noto Sans Elbasan" "Noto Sans Glagolitic"
[51] "Noto Sans Gothic" "Noto Sans HanifiRohg" "Noto Sans Hanunoo" "Noto Sans Hatran" "Noto Sans ImpAramaic"
[56] "Noto Sans InsPahlavi" "Noto Sans InsParthi" "Noto Sans Kaithi" "Noto Sans Kayah Li" "Noto Sans Kharoshthi"
[61] "Noto Sans Khojki" "Noto Sans Khudawadi" "Noto Sans Lepcha" "Noto Sans Limbu" "Noto Sans Linear A"
[66] "Noto Sans Linear B" "Noto Sans Lisu" "Noto Sans Lycian" "Noto Sans Lydian" "Noto Sans Mahajani"
[71] "Noto Sans Mandaic" "Noto Sans Manichaean" "Noto Sans Marchen" "Noto Sans MeeteiMayek" "Noto Sans Mende Kikakui"
[76] "Noto Sans Meroitic" "Noto Sans Miao" "Noto Sans Modi" "Noto Sans Mongolian" "Noto Sans Mro"
[81] "Noto Sans Multani" "Noto Sans Nabataean" "Noto Sans Newa" "Noto Sans NewTaiLue" "Noto Sans N'Ko"
[86] "Noto Sans Ogham" "Noto Sans Ol Chiki" "Noto Sans OldHung" "Noto Sans Old Italic" "Noto Sans OldNorArab"
[91] "Noto Sans Old Permic" "Noto Sans OldPersian" "Noto Sans OldSouArab" "Noto Sans Old Turkic" "Noto Sans Osage"
[96] "Noto Sans Osmanya" "Noto Sans Pahawh Hmong" "Noto Sans Palmyrene" "Noto Sans PauCinHau" "Noto Sans PhagsPa"
[101] "Noto Sans Phoenician" "Noto Sans PsaPahlavi" "Noto Sans Rejang" "Noto Sans Runic" "Noto Sans Samaritan"
[106] "Noto Sans Saurashtra" "Noto Sans Sharada" "Noto Sans Shavian" "Noto Sans Siddham" "Noto Sans SoraSomp"
[111] "Noto Sans Sundanese" "Noto Sans Syloti Nagri" "Noto Sans Syriac" "Noto Sans Tagalog" "Noto Sans Tagbanwa"
[116] "Noto Sans Tai Le" "Noto Sans Tai Tham" "Noto Sans Tai Viet" "Noto Sans Takri" "Noto Sans Thaana"
[121] "Noto Sans Tifinagh" "Noto Sans Tirhuta" "Noto Sans Ugaritic" "Noto Sans Vai" "Noto Sans Wancho"
[126] "Noto Sans WarangCiti" "Noto Sans Yi" "Noto Serif Ahom" "Noto Serif Balinese" "Party LET"
[131] "Tahoma" "Times New Roman" "Trattatello" "Trebuchet MS" "Verdana"
[136] "Webdings" "Wingdings" "Wingdings 2" "Wingdings 3" "Yu Gothic"
>
Describe the bug
When running the below script on Mac, Japanese characters got garbled. I found a similar issue https://github.com/quanteda/quanteda/issues/1317 and followed the suggestion but it didn't solve the problem.
macOS Big Sure (11.2.3)
This generates
font loaded on the R