{"action":"closed","issue":{"url":"https://api.github.com/repos/TurboPack/PowerPDF/issues/2","repository_url":"https://api.github.com/repos/TurboPack/PowerPDF","labels_url":"https://api.github.com/repos/TurboPack/PowerPDF/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/TurboPack/PowerPDF/issues/2/comments","events_url":"https://api.github.com/repos/TurboPack/PowerPDF/issues/2/events","html_url":"https://github.com/TurboPack/PowerPDF/issues/2","id":164487018,"number":2,"title":"Range check error in TPdfType1Font.GetCharWidth with Chars > 255","user":{"login":"BuwSh","id":15774844,"avatar_url":"https://avatars.githubusercontent.com/u/15774844?v=3","gravatar_id":"","url":"https://api.github.com/users/BuwSh","html_url":"https://github.com/BuwSh","followers_url":"https://api.github.com/users/BuwSh/followers","following_url":"https://api.github.com/users/BuwSh/following{/other_user}","gists_url":"https://api.github.com/users/BuwSh/gists{/gist_id}","starred_url":"https://api.github.com/users/BuwSh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuwSh/subscriptions","organizations_url":"https://api.github.com/users/BuwSh/orgs","repos_url":"https://api.github.com/users/BuwSh/repos","events_url":"https://api.github.com/users/BuwSh/events{/privacy}","received_events_url":"https://api.github.com/users/BuwSh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-08T08:55:43Z","updated_at":"2016-07-18T21:28:46Z","closed_at":"2016-07-18T21:28:46Z","body":"Hi,\r\n\r\nif I use the €-sign (and certainly all other non-Ascii chars > 255) in my PDF form, with range settings enabled the library will crash.\r\nThis is because the FArray is only 256 big, but Ord of the €-sign is 8364.\r\nI know it is not a perfect solution, but changing the function to this helps me as a workaround and prevents a crash.\r\n\r\n```\r\n{ TPdfType1Font }\r\nfunction TPdfType1Font.GetCharWidth(AText: string; APos: integer): integer;\r\nbegin\r\n  if ord(AText[APos]) >= Length(FArray) then\r\n    result := 1000\r\n  else\r\n    result := FArray[ord(AText[APos])];\r\nend;\r\n\r\n```\r\nBest regards\r\nSimon"}}
{"actor":{"display_login":"romankassebaum"}}