{"action":"closed","number":734,"pull_request":{"url":"https://api.github.com/repos/mpdf/mpdf/pulls/734","id":184813599,"html_url":"https://github.com/mpdf/mpdf/pull/734","diff_url":"https://github.com/mpdf/mpdf/pull/734.diff","patch_url":"https://github.com/mpdf/mpdf/pull/734.patch","issue_url":"https://api.github.com/repos/mpdf/mpdf/issues/734","number":734,"state":"closed","locked":false,"title":"Write Unit Tests for LanguageToFont Class","user":{"login":"jakejackson1","id":2918419,"avatar_url":"https://avatars1.githubusercontent.com/u/2918419?v=4","gravatar_id":"","url":"https://api.github.com/users/jakejackson1","html_url":"https://github.com/jakejackson1","followers_url":"https://api.github.com/users/jakejackson1/followers","following_url":"https://api.github.com/users/jakejackson1/following{/other_user}","gists_url":"https://api.github.com/users/jakejackson1/gists{/gist_id}","starred_url":"https://api.github.com/users/jakejackson1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakejackson1/subscriptions","organizations_url":"https://api.github.com/users/jakejackson1/orgs","repos_url":"https://api.github.com/users/jakejackson1/repos","events_url":"https://api.github.com/users/jakejackson1/events{/privacy}","received_events_url":"https://api.github.com/users/jakejackson1/received_events","type":"User","site_admin":false},"body":"During testing, it was found the `$country` parameter was being lowercased and the IF statements included weren't valid, as they included the country codes in uppercase.\r\n\r\nThe `fontByScript` method was also set to a protected function. This allows developers greater control over the fonts when extending the `LanguageToFont` class. By making this change, developers don't have to copy the entire `fontByScript` function to their new class. They can instead do:\r\n\r\n```php\r\n<?php\r\nclass CustomLanguageToFontImplementation extends \\Mpdf\\Language\\LanguageToFont\r\n{\r\n\r\n\tprotected function fontByScript($script, $adobeCJK)\r\n\t{\r\n\t\tif ($script === 'latn') {\r\n\t\t\treturn 'freeserif';\r\n\t\t}\r\n\r\n\t\treturn parent::fontByScript($script, $adobeCJK);\r\n\t}\r\n\r\n}\r\n\r\n```\r\n\r\nThis change goes hand-in-hand with https://github.com/mpdf/mpdf.github.io/pull/81 and https://github.com/mpdf/mpdf.github.io/pull/82.","created_at":"2018-04-29T01:34:57Z","updated_at":"2018-04-29T07:34:32Z","closed_at":"2018-04-29T07:34:32Z","merged_at":"2018-04-29T07:34:32Z","merge_commit_sha":"2245edf8d5fe71960d7a97b4c285beb123b831fc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mpdf/mpdf/pulls/734/commits","review_comments_url":"https://api.github.com/repos/mpdf/mpdf/pulls/734/comments","review_comment_url":"https://api.github.com/repos/mpdf/mpdf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mpdf/mpdf/issues/734/comments","statuses_url":"https://api.github.com/repos/mpdf/mpdf/statuses/4250d464a1f0bffd4b2378859e9111a0d83e1e44","head":{"label":"jakejackson1:LanguageToFontOverride","ref":"LanguageToFontOverride","sha":"4250d464a1f0bffd4b2378859e9111a0d83e1e44","user":{"login":"jakejackson1","id":2918419,"avatar_url":"https://avatars1.githubusercontent.com/u/2918419?v=4","gravatar_id":"","url":"https://api.github.com/users/jakejackson1","html_url":"https://github.com/jakejackson1","followers_url":"https://api.github.com/users/jakejackson1/followers","following_url":"https://api.github.com/users/jakejackson1/following{/other_user}","gists_url":"https://api.github.com/users/jakejackson1/gists{/gist_id}","starred_url":"https://api.github.com/users/jakejackson1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakejackson1/subscriptions","organizations_url":"https://api.github.com/users/jakejackson1/orgs","repos_url":"https://api.github.com/users/jakejackson1/repos","events_url":"https://api.github.com/users/jakejackson1/events{/privacy}","received_events_url":"https://api.github.com/users/jakejackson1/received_events","type":"User","site_admin":false},"repo":{"id":63219985,"name":"mpdf","full_name":"jakejackson1/mpdf","owner":{"login":"jakejackson1","id":2918419,"avatar_url":"https://avatars1.githubusercontent.com/u/2918419?v=4","gravatar_id":"","url":"https://api.github.com/users/jakejackson1","html_url":"https://github.com/jakejackson1","followers_url":"https://api.github.com/users/jakejackson1/followers","following_url":"https://api.github.com/users/jakejackson1/following{/other_user}","gists_url":"https://api.github.com/users/jakejackson1/gists{/gist_id}","starred_url":"https://api.github.com/users/jakejackson1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakejackson1/subscriptions","organizations_url":"https://api.github.com/users/jakejackson1/orgs","repos_url":"https://api.github.com/users/jakejackson1/repos","events_url":"https://api.github.com/users/jakejackson1/events{/privacy}","received_events_url":"https://api.github.com/users/jakejackson1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakejackson1/mpdf","description":"mPDF is a PHP library generating PDF files from UTF-8 encoded HTML","fork":true,"url":"https://api.github.com/repos/jakejackson1/mpdf","forks_url":"https://api.github.com/repos/jakejackson1/mpdf/forks","keys_url":"https://api.github.com/repos/jakejackson1/mpdf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakejackson1/mpdf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakejackson1/mpdf/teams","hooks_url":"https://api.github.com/repos/jakejackson1/mpdf/hooks","issue_events_url":"https://api.github.com/repos/jakejackson1/mpdf/issues/events{/number}","events_url":"https://api.github.com/repos/jakejackson1/mpdf/events","assignees_url":"https://api.github.com/repos/jakejackson1/mpdf/assignees{/user}","branches_url":"https://api.github.com/repos/jakejackson1/mpdf/branches{/branch}","tags_url":"https://api.github.com/repos/jakejackson1/mpdf/tags","blobs_url":"https://api.github.com/repos/jakejackson1/mpdf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakejackson1/mpdf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakejackson1/mpdf/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakejackson1/mpdf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakejackson1/mpdf/statuses/{sha}","languages_url":"https://api.github.com/repos/jakejackson1/mpdf/languages","stargazers_url":"https://api.github.com/repos/jakejackson1/mpdf/stargazers","contributors_url":"https://api.github.com/repos/jakejackson1/mpdf/contributors","subscribers_url":"https://api.github.com/repos/jakejackson1/mpdf/subscribers","subscription_url":"https://api.github.com/repos/jakejackson1/mpdf/subscription","commits_url":"https://api.github.com/repos/jakejackson1/mpdf/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakejackson1/mpdf/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakejackson1/mpdf/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakejackson1/mpdf/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakejackson1/mpdf/contents/{+path}","compare_url":"https://api.github.com/repos/jakejackson1/mpdf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakejackson1/mpdf/merges","archive_url":"https://api.github.com/repos/jakejackson1/mpdf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakejackson1/mpdf/downloads","issues_url":"https://api.github.com/repos/jakejackson1/mpdf/issues{/number}","pulls_url":"https://api.github.com/repos/jakejackson1/mpdf/pulls{/number}","milestones_url":"https://api.github.com/repos/jakejackson1/mpdf/milestones{/number}","notifications_url":"https://api.github.com/repos/jakejackson1/mpdf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakejackson1/mpdf/labels{/name}","releases_url":"https://api.github.com/repos/jakejackson1/mpdf/releases{/id}","deployments_url":"https://api.github.com/repos/jakejackson1/mpdf/deployments","created_at":"2016-07-13T06:20:10Z","updated_at":"2016-07-13T06:20:12Z","pushed_at":"2018-04-29T03:47:14Z","git_url":"git://github.com/jakejackson1/mpdf.git","ssh_url":"git@github.com:jakejackson1/mpdf.git","clone_url":"https://github.com/jakejackson1/mpdf.git","svn_url":"https://github.com/jakejackson1/mpdf","homepage":"https://mpdf.github.io","size":86629,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"mpdf:development","ref":"development","sha":"c441d4099c7a696a47af1daa820a86d91a11506d","user":{"login":"mpdf","id":2331117,"avatar_url":"https://avatars3.githubusercontent.com/u/2331117?v=4","gravatar_id":"","url":"https://api.github.com/users/mpdf","html_url":"https://github.com/mpdf","followers_url":"https://api.github.com/users/mpdf/followers","following_url":"https://api.github.com/users/mpdf/following{/other_user}","gists_url":"https://api.github.com/users/mpdf/gists{/gist_id}","starred_url":"https://api.github.com/users/mpdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpdf/subscriptions","organizations_url":"https://api.github.com/users/mpdf/orgs","repos_url":"https://api.github.com/users/mpdf/repos","events_url":"https://api.github.com/users/mpdf/events{/privacy}","received_events_url":"https://api.github.com/users/mpdf/received_events","type":"Organization","site_admin":false},"repo":{"id":31595609,"name":"mpdf","full_name":"mpdf/mpdf","owner":{"login":"mpdf","id":2331117,"avatar_url":"https://avatars3.githubusercontent.com/u/2331117?v=4","gravatar_id":"","url":"https://api.github.com/users/mpdf","html_url":"https://github.com/mpdf","followers_url":"https://api.github.com/users/mpdf/followers","following_url":"https://api.github.com/users/mpdf/following{/other_user}","gists_url":"https://api.github.com/users/mpdf/gists{/gist_id}","starred_url":"https://api.github.com/users/mpdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpdf/subscriptions","organizations_url":"https://api.github.com/users/mpdf/orgs","repos_url":"https://api.github.com/users/mpdf/repos","events_url":"https://api.github.com/users/mpdf/events{/privacy}","received_events_url":"https://api.github.com/users/mpdf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mpdf/mpdf","description":"PHP library generating PDF files from UTF-8 encoded HTML","fork":false,"url":"https://api.github.com/repos/mpdf/mpdf","forks_url":"https://api.github.com/repos/mpdf/mpdf/forks","keys_url":"https://api.github.com/repos/mpdf/mpdf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpdf/mpdf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpdf/mpdf/teams","hooks_url":"https://api.github.com/repos/mpdf/mpdf/hooks","issue_events_url":"https://api.github.com/repos/mpdf/mpdf/issues/events{/number}","events_url":"https://api.github.com/repos/mpdf/mpdf/events","assignees_url":"https://api.github.com/repos/mpdf/mpdf/assignees{/user}","branches_url":"https://api.github.com/repos/mpdf/mpdf/branches{/branch}","tags_url":"https://api.github.com/repos/mpdf/mpdf/tags","blobs_url":"https://api.github.com/repos/mpdf/mpdf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpdf/mpdf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpdf/mpdf/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpdf/mpdf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpdf/mpdf/statuses/{sha}","languages_url":"https://api.github.com/repos/mpdf/mpdf/languages","stargazers_url":"https://api.github.com/repos/mpdf/mpdf/stargazers","contributors_url":"https://api.github.com/repos/mpdf/mpdf/contributors","subscribers_url":"https://api.github.com/repos/mpdf/mpdf/subscribers","subscription_url":"https://api.github.com/repos/mpdf/mpdf/subscription","commits_url":"https://api.github.com/repos/mpdf/mpdf/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpdf/mpdf/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpdf/mpdf/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpdf/mpdf/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpdf/mpdf/contents/{+path}","compare_url":"https://api.github.com/repos/mpdf/mpdf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpdf/mpdf/merges","archive_url":"https://api.github.com/repos/mpdf/mpdf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpdf/mpdf/downloads","issues_url":"https://api.github.com/repos/mpdf/mpdf/issues{/number}","pulls_url":"https://api.github.com/repos/mpdf/mpdf/pulls{/number}","milestones_url":"https://api.github.com/repos/mpdf/mpdf/milestones{/number}","notifications_url":"https://api.github.com/repos/mpdf/mpdf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpdf/mpdf/labels{/name}","releases_url":"https://api.github.com/repos/mpdf/mpdf/releases{/id}","deployments_url":"https://api.github.com/repos/mpdf/mpdf/deployments","created_at":"2015-03-03T11:44:47Z","updated_at":"2018-04-29T07:32:39Z","pushed_at":"2018-04-29T07:34:32Z","git_url":"git://github.com/mpdf/mpdf.git","ssh_url":"git@github.com:mpdf/mpdf.git","clone_url":"https://github.com/mpdf/mpdf.git","svn_url":"https://github.com/mpdf/mpdf","homepage":"https://mpdf.github.io","size":86908,"stargazers_count":1251,"watchers_count":1251,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":403,"mirror_url":null,"archived":false,"open_issues_count":206,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":403,"open_issues":206,"watchers":1251,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/mpdf/mpdf/pulls/734"},"html":{"href":"https://github.com/mpdf/mpdf/pull/734"},"issue":{"href":"https://api.github.com/repos/mpdf/mpdf/issues/734"},"comments":{"href":"https://api.github.com/repos/mpdf/mpdf/issues/734/comments"},"review_comments":{"href":"https://api.github.com/repos/mpdf/mpdf/pulls/734/comments"},"review_comment":{"href":"https://api.github.com/repos/mpdf/mpdf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mpdf/mpdf/pulls/734/commits"},"statuses":{"href":"https://api.github.com/repos/mpdf/mpdf/statuses/4250d464a1f0bffd4b2378859e9111a0d83e1e44"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"finwe","id":195675,"avatar_url":"https://avatars0.githubusercontent.com/u/195675?v=4","gravatar_id":"","url":"https://api.github.com/users/finwe","html_url":"https://github.com/finwe","followers_url":"https://api.github.com/users/finwe/followers","following_url":"https://api.github.com/users/finwe/following{/other_user}","gists_url":"https://api.github.com/users/finwe/gists{/gist_id}","starred_url":"https://api.github.com/users/finwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finwe/subscriptions","organizations_url":"https://api.github.com/users/finwe/orgs","repos_url":"https://api.github.com/users/finwe/repos","events_url":"https://api.github.com/users/finwe/events{/privacy}","received_events_url":"https://api.github.com/users/finwe/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":75,"deletions":5,"changed_files":3}}
{"actor":{"display_login":"finwe"}}