{"action":"created","issue":{"url":"https://api.github.com/repos/wch/extrafont/issues/35","repository_url":"https://api.github.com/repos/wch/extrafont","labels_url":"https://api.github.com/repos/wch/extrafont/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/wch/extrafont/issues/35/comments","events_url":"https://api.github.com/repos/wch/extrafont/issues/35/events","html_url":"https://github.com/wch/extrafont/issues/35","id":22535197,"number":35,"title":"Missing minus symbol","user":{"login":"stevencowman","id":5921435,"avatar_url":"https://avatars2.githubusercontent.com/u/5921435?v=4","gravatar_id":"","url":"https://api.github.com/users/stevencowman","html_url":"https://github.com/stevencowman","followers_url":"https://api.github.com/users/stevencowman/followers","following_url":"https://api.github.com/users/stevencowman/following{/other_user}","gists_url":"https://api.github.com/users/stevencowman/gists{/gist_id}","starred_url":"https://api.github.com/users/stevencowman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevencowman/subscriptions","organizations_url":"https://api.github.com/users/stevencowman/orgs","repos_url":"https://api.github.com/users/stevencowman/repos","events_url":"https://api.github.com/users/stevencowman/events{/privacy}","received_events_url":"https://api.github.com/users/stevencowman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2013-11-12T17:16:51Z","updated_at":"2017-12-08T21:07:15Z","closed_at":null,"author_association":"NONE","body":"Dear Winston,\n\nI realise this has been raised as an issue previously, but it is marked as 'closed' however I still have this problem. I apologise in advance if I am overlooking something obvious but I have been unable to find a solution.\n\nAfter installing extrafont, I import my fonts:\n\n```\n> library(extrafontdb)\n> library(extrafont)\n> ttf_import()\nScanning ttf files in /Library/Fonts/, /System/Library/Fonts, ~/Library/Fonts/ ...\nExtracting .afm files from .ttf files...\n/Library/Fonts/AlBayan.ttf : No FontName. Skipping.\n/Library/Fonts/AlBayanBold.ttf : No FontName. Skipping.\n/Library/Fonts/Andale Mono.ttf => /Users/sc7512/Library/R/3.0/library/extrafontdb/metrics/Andale Mono\n```\n\n...and so on\n\nThis give me multiple warnings:\n\n```\n> warnings()\nWarning messages:\n1: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/AlBayan.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/AlBayan' 2>&1' had status 1\n2: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/AlBayanBold.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/AlBayanBold' 2>&1' had status 1\n3: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Apple Chancery.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Apple Chancery' 2>&1' had status 1\n4: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Apple LiGothic Medium.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Apple LiGothic Medium' 2>&1' had status 1\n5: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Apple LiSung Light.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Apple LiSung Light' 2>&1' had status 1\n6: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/ArialHB.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/ArialHB' 2>&1' had status 1\n7: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/ArialHBBold.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/ArialHBBold' 2>&1' had status 1\n8: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/BiauKai.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/BiauKai' 2>&1' had status 1\n9: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Chalkduster.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Chalkduster' 2>&1' had status 134\n10: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Corsiva.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Corsiva' 2>&1' had status 1\n11: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/CorsivaBold.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/CorsivaBold' 2>&1' had status 1\n12: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/HeadlineA.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/HeadlineA' 2>&1' had status 1\n13: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Hei.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Hei' 2>&1' had status 1\n14: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Kai.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Kai' 2>&1' had status 1\n15: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Kokonor.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Kokonor' 2>&1' had status 134\n16: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/KufiStandardGK.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/KufiStandardGK' 2>&1' had status 1\n17: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/NewPeninimMT.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/NewPeninimMT' 2>&1' had status 1\n18: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/NewPeninimMTBold.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/NewPeninimMTBold' 2>&1' had status 1\n19: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/NewPeninimMTBoldInclined.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/NewPeninimMTBoldInclined' 2>&1' had status 1\n20: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/NewPeninimMTInclined.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/NewPeninimMTInclined' 2>&1' had status 1\n21: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/NISC18030.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/NISC18030' 2>&1' had status 1\n22: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Osaka.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Osaka' 2>&1' had status 1\n23: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/OsakaMono.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/OsakaMono' 2>&1' had status 1\n24: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/PCmyoungjo.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/PCmyoungjo' 2>&1' had status 1\n25: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Pilgiche.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Pilgiche' 2>&1' had status 1\n26: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Raanana.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Raanana' 2>&1' had status 1\n27: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/RaananaBold.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/RaananaBold' 2>&1' had status 1\n28: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/Skia.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Skia' 2>&1' had status 1\n29: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/华文仿宋.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/华文仿宋' 2>&1' had status 1\n30: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/华文细黑.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/华文细黑' 2>&1' had status 1\n31: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/Library/Fonts/华文黑体.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/华文黑体' 2>&1' had status 1\n32: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/System/Library/Fonts/Apple Color Emoji.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Apple Color Emoji' 2>&1' had status 1\n33: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/System/Library/Fonts/Apple Symbols.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/Apple Symbols' 2>&1' had status 1\n34: running command ''/Users/sc7512/Library/R/3.0/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/System/Library/Fonts/LastResort.ttf' '/var/folders/28/d8jlmryn3l3gm6xbn0fz_dp000g1x6/T//RtmpSvfRxg/fonts/LastResort' 2>&1' had status 1\n35: In readLines(fd, 30) : seek on a gzfile connection returned an internal error\n36: In readLines(fd, 30) : seek on a gzfile connection returned an internal error\n37: In grepl(\"^FamilyName\", text) : input string 4 is invalid in this locale\n38: In grepl(\"^FontName\", text) : input string 4 is invalid in this locale\n39: In grepl(\"^FullName\", text) : input string 4 is invalid in this locale\n40: In grepl(\"^Weight\", text) : input string 4 is invalid in this locale\n41: In readLines(fd, 30) : seek on a gzfile connection returned an internal error\n42: In grepl(\"^FamilyName\", text) : input string 4 is invalid in this locale\n43: In grepl(\"^FontName\", text) : input string 4 is invalid in this locale\n44: In grepl(\"^FullName\", text) : input string 4 is invalid in this locale\n45: In grepl(\"^Weight\", text) : input string 4 is invalid in this locale\n46: In readLines(fd, 30) : seek on a gzfile connection returned an internal error\n47: In grepl(\"^FamilyName\", text) : input string 4 is invalid in this locale\n48: In grepl(\"^FontName\", text) : input string 4 is invalid in this locale\n49: In grepl(\"^FullName\", text) : input string 4 is invalid in this locale\n50: In grepl(\"^Weight\", text) : input string 4 is invalid in this locale\n```\n\nDespite this, load fonts() seems to work:\n\n```\nRegistering font with R using pdfFonts(): .Keyboard\nRegistering font with R using pdfFonts(): Andale Mono\nMore than one version of regular/bold/italic found for Apple Braille. Skipping setup for this font.\nRegistering font with R using pdfFonts(): AppleMyungjo\nRegistering font with R using pdfFonts(): Arial Black\nRegistering font with R using pdfFonts(): Arial\nRegistering font with R using pdfFonts(): Arial Narrow\nRegistering font with R using pdfFonts(): Arial Rounded MT Bold\n```\n\netc.\n\nand the fonts which imported without error are listed as loaded and available:\n\n```\n> fonts()\n [1] \".Keyboard\"               \"Andale Mono\"             \"Apple Braille\"           \"AppleMyungjo\"           \n [5] \"Arial Black\"             \"Arial\"                   \"Arial Narrow\"            \"Arial Rounded MT Bold\"  \n [9] \"Arial Unicode MS\"        \"Batang\"                  \"Bookshelf Symbol 7\"      \"Brush Script MT\"        \n[13] \"Calibri\"                 \"Cambria\"                 \"Cambria Math\"            \"Candara\"                \n[17] \"Comic Sans MS\"           \"Consolas\"                \"Constantia\"              \"Corbel\"                 \n[21] \"Courier New\"             \"Franklin Gothic Book\"    \"Franklin Gothic Medium\"  \"Gabriola\"               \n[25] \"Georgia\"                 \"Gill Sans MT\"            \"Gulim\"                   \"Impact\"                 \n[29] \"Khmer Sangam MN\"         \"Lao Sangam MN\"           \"Lucida Console\"          \"Lucida Sans Unicode\"    \n[33] \"Marlett\"                 \"Meiryo\"                  \"Microsoft Yi Baiti\"      \"Microsoft Himalaya\"     \n[37] \"Microsoft Sans Serif\"    \"Microsoft Tai Le\"        \"MingLiU_HKSCS-ExtB\"      \"MingLiU_HKSCS\"          \n[41] \"MingLiU\"                 \"MingLiU-ExtB\"            \"Mongolian Baiti\"         \"MS Gothic\"              \n[45] \"MS Mincho\"               \"MS PGothic\"              \"MS PMincho\"              \"MS Reference Sans Serif\"\n[49] \"MS Reference Specialty\"  \"Myanmar Sangam MN\"       \"Palatino Linotype\"       \"Perpetua\"               \n[53] \"PMingLiU\"                \"PMingLiU-ExtB\"           \"SimHei\"                  \"SimSun\"                 \n[57] \"SimSun-ExtB\"             \"Tahoma\"                  \"Times New Roman\"         \"Trebuchet MS\"           \n[61] \"Tw Cen MT\"               \"Verdana\"                 \"Webdings\"                \"Wingdings\"              \n[65] \"Wingdings 2\"             \"Wingdings 3\"           \n```\n\nHowever, my chosen font (Gill Sans MT) does not display minus characters:\n\n```\na <- 0:100\nb <- -50:50\npdf(\"test.pdf\", family=\"Gill Sans MT\", height=10, width=10)\nWarning messages:\n1: In pdf(\"test.pdf\", family = \"Gill Sans MT\", height = 10, width = 10) :\n  unknown AFM entity encountered\n2: In pdf(\"test.pdf\", family = \"Gill Sans MT\", height = 10, width = 10) :\n  unknown AFM entity encountered\n3: In pdf(\"test.pdf\", family = \"Gill Sans MT\", height = 10, width = 10) :\n  unknown AFM entity encountered\n4: In pdf(\"test.pdf\", family = \"Gill Sans MT\", height = 10, width = 10) :\n  unknown AFM entity encountered\nplot(a~b)\nWarning messages:\n1: In axis(side = side, at = at, labels = labels, ...) :\n  font width unknown for character 0x2d\n2: In axis(side = side, at = at, labels = labels, ...) :\n  font width unknown for character 0x2d\n3: In axis(side = side, at = at, labels = labels, ...) :\n  font width unknown for character 0x2d\n4: In axis(side = side, at = at, labels = labels, ...) :\n  font width unknown for character 0x2d\n> dev.off()\nnull device \n          1 \n> embed_fonts(\"test.pdf\")\n```\n\nThe resulting plot displays the missing character box where a minus symbol should be.\n\nMy session info is:\n\n```\n> sessionInfo()\nR version 3.0.1 (2013-05-16)\nPlatform: x86_64-apple-darwin10.8.0 (64-bit)\n\nlocale:\n[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8\n\nattached base packages:\n[1] stats     graphics  grDevices utils     datasets  methods   base     \n\nother attached packages:\n[1] extrafont_0.15  extrafontdb_1.0\n\nloaded via a namespace (and not attached):\n[1] Rttf2pt1_1.2 tools_3.0.1 \n```\n\nI would be very grateful for your help with this problem,\n\nBest wishes,\n\nSteve\n"},"comment":{"url":"https://api.github.com/repos/wch/extrafont/issues/comments/350371911","html_url":"https://github.com/wch/extrafont/issues/35#issuecomment-350371911","issue_url":"https://api.github.com/repos/wch/extrafont/issues/35","id":350371911,"user":{"login":"pbaine","id":16889584,"avatar_url":"https://avatars1.githubusercontent.com/u/16889584?v=4","gravatar_id":"","url":"https://api.github.com/users/pbaine","html_url":"https://github.com/pbaine","followers_url":"https://api.github.com/users/pbaine/followers","following_url":"https://api.github.com/users/pbaine/following{/other_user}","gists_url":"https://api.github.com/users/pbaine/gists{/gist_id}","starred_url":"https://api.github.com/users/pbaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbaine/subscriptions","organizations_url":"https://api.github.com/users/pbaine/orgs","repos_url":"https://api.github.com/users/pbaine/repos","events_url":"https://api.github.com/users/pbaine/events{/privacy}","received_events_url":"https://api.github.com/users/pbaine/received_events","type":"User","site_admin":false},"created_at":"2017-12-08T21:07:15Z","updated_at":"2017-12-08T21:07:15Z","author_association":"NONE","body":"Hey guys, I know this is a little after the fact but I was having the same issue. I fixed it by using the command cairo_pdf() instead of pdf(). I was having the same exact issue using Gill Sans MT, thought I'd post this answer in case anybody else comes across this old thread like I did today."}}
{"actor":{"display_login":"pbaine"}}