{"action":"created","comment":{"url":"https://api.github.com/repos/bodoni/opentype/pulls/comments/82522722","pull_request_review_id":3426011,"id":82522722,"diff_hunk":"@@ -0,0 +1,142 @@\n+use truetype::{Result, Tape, Value};\n+\n+use layout::Coverage;\n+use super::ValueRecord;\n+\n+table! {\n+    @position\n+    #[doc = \"A table of positioning information defined on a per-glyph bases.\"]\n+    pub GlyphInfo { // MathGlyphInfo\n+        italics_correction_offset      (u16), // MathItalicsCorrectionInfo\n+        top_accent_offset              (u16), // MathTopAccentAttachment\n+        extended_shape_coverage_offset (u16), // ExtendedShapeCoverage\n+        kern_info_offset               (u16), // MathKernInfo\n+\n+        italics_corrections (Option<ItalicsCorrections>) |this, tape, position| {\n+            jump_take_maybe!(tape, position, this.italics_correction_offset)        \n+        },\n+\n+        top_accent_attachments (Option<TopAccentAttachments>) |this, tape, position| {\n+            jump_take_maybe!(tape, position, this.top_accent_offset)\n+        },\n+\n+        extended_shape_coverage (Option<Coverage>) |this, tape, position| {\n+            jump_take_maybe!(tape, position, this.extended_shape_coverage_offset)\n+        },\n+\n+        kern_info (Option<KernInfo>) |this, tape, position| {\n+            jump_take_maybe!(tape, position, this.kern_info_offset)\n+        },\n+    }\n+}\n+\n+table! {\n+    @position\n+    #[doc = \"A table of italics corrections.\"]\n+    pub ItalicsCorrections { // MathItalicsCorrectionInfo\n+        coverage_offset (u16), // Coverage\n+        count           (u16), // ItalicsCorrectionCount\n+\n+        corrections (Vec<ValueRecord>) |this, tape, _| { // ItalicsCorrection\n+           tape.take_given(this.count as usize)\n+        },\n+\n+        coverage (Coverage) |this, tape, position| {\n+            jump_take!(tape, position, this.coverage_offset)\n+        },\n+    }\n+}\n+\n+table! {\n+    @position\n+    #[doc = \"A table of horizontal positioning for top accents.\"]\n+    pub TopAccentAttachments { // MathTopAccentAttachment\n+        coverage_offset (u16), // TopAccentCoverage\n+        count           (u16), // TopAccentAttachmentCount\n+\n+        attachments (Vec<ValueRecord>) |this, tape, _| {    \n+           tape.take_given(this.count as usize)\n+        },\n+\n+        coverage (Coverage) |this, tape, position| {\n+            jump_take!(tape, position, this.coverage_offset)\n+        },\n+    }\n+}\n+\n+table! {\n+    @position\n+    #[doc = \"A table of kerning information for mathematical glyphs.\"]\n+    pub KernInfo {\n+        coverage_offset (u16), // MathKernCoverage\n+        count           (u16), // MathKernCount\n+\n+        kernings (Vec<KernGlyph>) |this, tape, position| {\n+            let mut kern_glyphs: Vec<KernGlyph> = Vec::with_capacity(this.count as usize);\n+            for _ in 0..this.count {\n+                kern_glyphs.push(try!(tape.take()));\n+            }\n+            for kern in &mut kern_glyphs {\n+                kern.top_right = jump_take_maybe!(@unwrap tape, position, kern.top_right_offset);\n+                kern.top_left = jump_take_maybe!(@unwrap tape, position, kern.top_left_offset);\n+                kern.bottom_right = jump_take_maybe!(@unwrap tape, position, kern.bottom_right_offset);\n+                kern.bottom_left = jump_take_maybe!(@unwrap tape, position, kern.bottom_left_offset);\n+            }","path":"src/mathematics/glyphinfo.rs","position":84,"original_position":84,"commit_id":"13d2d90316c2dc259ee78bac670233e80e37a6ec","original_commit_id":"13d2d90316c2dc259ee78bac670233e80e37a6ec","user":{"login":"cbreeden","id":12069845,"avatar_url":"https://avatars.githubusercontent.com/u/12069845?v=3","gravatar_id":"","url":"https://api.github.com/users/cbreeden","html_url":"https://github.com/cbreeden","followers_url":"https://api.github.com/users/cbreeden/followers","following_url":"https://api.github.com/users/cbreeden/following{/other_user}","gists_url":"https://api.github.com/users/cbreeden/gists{/gist_id}","starred_url":"https://api.github.com/users/cbreeden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbreeden/subscriptions","organizations_url":"https://api.github.com/users/cbreeden/orgs","repos_url":"https://api.github.com/users/cbreeden/repos","events_url":"https://api.github.com/users/cbreeden/events{/privacy}","received_events_url":"https://api.github.com/users/cbreeden/received_events","type":"User","site_admin":false},"body":"I original had exactly that, but it didn't quite work for some reason.  But looking at your `Mark1` implementation, it seems like it should've worked.  I'll try again.","created_at":"2016-10-09T13:49:39Z","updated_at":"2016-10-09T13:49:39Z","html_url":"https://github.com/bodoni/opentype/pull/6#discussion_r82522722","pull_request_url":"https://api.github.com/repos/bodoni/opentype/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/bodoni/opentype/pulls/comments/82522722"},"html":{"href":"https://github.com/bodoni/opentype/pull/6#discussion_r82522722"},"pull_request":{"href":"https://api.github.com/repos/bodoni/opentype/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/bodoni/opentype/pulls/6","id":88508882,"html_url":"https://github.com/bodoni/opentype/pull/6","diff_url":"https://github.com/bodoni/opentype/pull/6.diff","patch_url":"https://github.com/bodoni/opentype/pull/6.patch","issue_url":"https://api.github.com/repos/bodoni/opentype/issues/6","number":6,"state":"open","locked":false,"title":"Support OpenType math tables","user":{"login":"cbreeden","id":12069845,"avatar_url":"https://avatars.githubusercontent.com/u/12069845?v=3","gravatar_id":"","url":"https://api.github.com/users/cbreeden","html_url":"https://github.com/cbreeden","followers_url":"https://api.github.com/users/cbreeden/followers","following_url":"https://api.github.com/users/cbreeden/following{/other_user}","gists_url":"https://api.github.com/users/cbreeden/gists{/gist_id}","starred_url":"https://api.github.com/users/cbreeden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbreeden/subscriptions","organizations_url":"https://api.github.com/users/cbreeden/orgs","repos_url":"https://api.github.com/users/cbreeden/repos","events_url":"https://api.github.com/users/cbreeden/events{/privacy}","received_events_url":"https://api.github.com/users/cbreeden/received_events","type":"User","site_admin":false},"body":"So I started on adding support for math tables.  I thought that maybe you could take a look and see if this is _roughly_ the right direction.\r\n\r\nOpen Questions:\r\n\r\n1. Many of the units have some kind of defined meaning.  I was hoping I could use the type system to communicate this.  For instance, using the type `DesignUnits` for design units and `Percantage` for percentage units.  These probably belong somewhere else.\r\n\r\n2. Math table support may tend to poor, even for fonts claiming to support OpenType math -- at least this is my hunch right now.  XeTeX will only take a subset of the values found in the constants table and then map them directly to their respective TeX font dimensions (in contrast to LauTeX who modified TeX's internal rendering engine to add support for additional parameters similar to the ones found in the constant table).  I suspect that some fonts may only populate the fields that XeTeX cares about.  So I question if it's worth being able to assign default values for the missing values (I think LauTeX might do something like this, I should verify).  Do you have any thoughts here?","created_at":"2016-10-07T21:12:31Z","updated_at":"2016-10-09T13:49:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d19beda026db8bfa340fb1b489393ceca7359150","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bodoni/opentype/pulls/6/commits","review_comments_url":"https://api.github.com/repos/bodoni/opentype/pulls/6/comments","review_comment_url":"https://api.github.com/repos/bodoni/opentype/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bodoni/opentype/issues/6/comments","statuses_url":"https://api.github.com/repos/bodoni/opentype/statuses/13d2d90316c2dc259ee78bac670233e80e37a6ec","head":{"label":"cbreeden:opentype-1.8","ref":"opentype-1.8","sha":"13d2d90316c2dc259ee78bac670233e80e37a6ec","user":{"login":"cbreeden","id":12069845,"avatar_url":"https://avatars.githubusercontent.com/u/12069845?v=3","gravatar_id":"","url":"https://api.github.com/users/cbreeden","html_url":"https://github.com/cbreeden","followers_url":"https://api.github.com/users/cbreeden/followers","following_url":"https://api.github.com/users/cbreeden/following{/other_user}","gists_url":"https://api.github.com/users/cbreeden/gists{/gist_id}","starred_url":"https://api.github.com/users/cbreeden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbreeden/subscriptions","organizations_url":"https://api.github.com/users/cbreeden/orgs","repos_url":"https://api.github.com/users/cbreeden/repos","events_url":"https://api.github.com/users/cbreeden/events{/privacy}","received_events_url":"https://api.github.com/users/cbreeden/received_events","type":"User","site_admin":false},"repo":{"id":70282415,"name":"opentype","full_name":"cbreeden/opentype","owner":{"login":"cbreeden","id":12069845,"avatar_url":"https://avatars.githubusercontent.com/u/12069845?v=3","gravatar_id":"","url":"https://api.github.com/users/cbreeden","html_url":"https://github.com/cbreeden","followers_url":"https://api.github.com/users/cbreeden/followers","following_url":"https://api.github.com/users/cbreeden/following{/other_user}","gists_url":"https://api.github.com/users/cbreeden/gists{/gist_id}","starred_url":"https://api.github.com/users/cbreeden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbreeden/subscriptions","organizations_url":"https://api.github.com/users/cbreeden/orgs","repos_url":"https://api.github.com/users/cbreeden/repos","events_url":"https://api.github.com/users/cbreeden/events{/privacy}","received_events_url":"https://api.github.com/users/cbreeden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbreeden/opentype","description":"Parser for OpenType fonts","fork":true,"url":"https://api.github.com/repos/cbreeden/opentype","forks_url":"https://api.github.com/repos/cbreeden/opentype/forks","keys_url":"https://api.github.com/repos/cbreeden/opentype/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbreeden/opentype/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbreeden/opentype/teams","hooks_url":"https://api.github.com/repos/cbreeden/opentype/hooks","issue_events_url":"https://api.github.com/repos/cbreeden/opentype/issues/events{/number}","events_url":"https://api.github.com/repos/cbreeden/opentype/events","assignees_url":"https://api.github.com/repos/cbreeden/opentype/assignees{/user}","branches_url":"https://api.github.com/repos/cbreeden/opentype/branches{/branch}","tags_url":"https://api.github.com/repos/cbreeden/opentype/tags","blobs_url":"https://api.github.com/repos/cbreeden/opentype/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbreeden/opentype/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbreeden/opentype/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbreeden/opentype/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbreeden/opentype/statuses/{sha}","languages_url":"https://api.github.com/repos/cbreeden/opentype/languages","stargazers_url":"https://api.github.com/repos/cbreeden/opentype/stargazers","contributors_url":"https://api.github.com/repos/cbreeden/opentype/contributors","subscribers_url":"https://api.github.com/repos/cbreeden/opentype/subscribers","subscription_url":"https://api.github.com/repos/cbreeden/opentype/subscription","commits_url":"https://api.github.com/repos/cbreeden/opentype/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbreeden/opentype/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbreeden/opentype/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbreeden/opentype/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbreeden/opentype/contents/{+path}","compare_url":"https://api.github.com/repos/cbreeden/opentype/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbreeden/opentype/merges","archive_url":"https://api.github.com/repos/cbreeden/opentype/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbreeden/opentype/downloads","issues_url":"https://api.github.com/repos/cbreeden/opentype/issues{/number}","pulls_url":"https://api.github.com/repos/cbreeden/opentype/pulls{/number}","milestones_url":"https://api.github.com/repos/cbreeden/opentype/milestones{/number}","notifications_url":"https://api.github.com/repos/cbreeden/opentype/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbreeden/opentype/labels{/name}","releases_url":"https://api.github.com/repos/cbreeden/opentype/releases{/id}","deployments_url":"https://api.github.com/repos/cbreeden/opentype/deployments","created_at":"2016-10-07T20:58:29Z","updated_at":"2016-10-07T20:58:30Z","pushed_at":"2016-10-09T01:12:08Z","git_url":"git://github.com/cbreeden/opentype.git","ssh_url":"git@github.com:cbreeden/opentype.git","clone_url":"https://github.com/cbreeden/opentype.git","svn_url":"https://github.com/cbreeden/opentype","homepage":"","size":2775,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bodoni:opentype-1.8","ref":"opentype-1.8","sha":"5f37f2c4cbd69d86c11238fcd392e3fae860a89a","user":{"login":"bodoni","id":10583310,"avatar_url":"https://avatars.githubusercontent.com/u/10583310?v=3","gravatar_id":"","url":"https://api.github.com/users/bodoni","html_url":"https://github.com/bodoni","followers_url":"https://api.github.com/users/bodoni/followers","following_url":"https://api.github.com/users/bodoni/following{/other_user}","gists_url":"https://api.github.com/users/bodoni/gists{/gist_id}","starred_url":"https://api.github.com/users/bodoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bodoni/subscriptions","organizations_url":"https://api.github.com/users/bodoni/orgs","repos_url":"https://api.github.com/users/bodoni/repos","events_url":"https://api.github.com/users/bodoni/events{/privacy}","received_events_url":"https://api.github.com/users/bodoni/received_events","type":"Organization","site_admin":false},"repo":{"id":22879790,"name":"opentype","full_name":"bodoni/opentype","owner":{"login":"bodoni","id":10583310,"avatar_url":"https://avatars.githubusercontent.com/u/10583310?v=3","gravatar_id":"","url":"https://api.github.com/users/bodoni","html_url":"https://github.com/bodoni","followers_url":"https://api.github.com/users/bodoni/followers","following_url":"https://api.github.com/users/bodoni/following{/other_user}","gists_url":"https://api.github.com/users/bodoni/gists{/gist_id}","starred_url":"https://api.github.com/users/bodoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bodoni/subscriptions","organizations_url":"https://api.github.com/users/bodoni/orgs","repos_url":"https://api.github.com/users/bodoni/repos","events_url":"https://api.github.com/users/bodoni/events{/privacy}","received_events_url":"https://api.github.com/users/bodoni/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bodoni/opentype","description":"Parser for OpenType fonts","fork":false,"url":"https://api.github.com/repos/bodoni/opentype","forks_url":"https://api.github.com/repos/bodoni/opentype/forks","keys_url":"https://api.github.com/repos/bodoni/opentype/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bodoni/opentype/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bodoni/opentype/teams","hooks_url":"https://api.github.com/repos/bodoni/opentype/hooks","issue_events_url":"https://api.github.com/repos/bodoni/opentype/issues/events{/number}","events_url":"https://api.github.com/repos/bodoni/opentype/events","assignees_url":"https://api.github.com/repos/bodoni/opentype/assignees{/user}","branches_url":"https://api.github.com/repos/bodoni/opentype/branches{/branch}","tags_url":"https://api.github.com/repos/bodoni/opentype/tags","blobs_url":"https://api.github.com/repos/bodoni/opentype/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bodoni/opentype/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bodoni/opentype/git/refs{/sha}","trees_url":"https://api.github.com/repos/bodoni/opentype/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bodoni/opentype/statuses/{sha}","languages_url":"https://api.github.com/repos/bodoni/opentype/languages","stargazers_url":"https://api.github.com/repos/bodoni/opentype/stargazers","contributors_url":"https://api.github.com/repos/bodoni/opentype/contributors","subscribers_url":"https://api.github.com/repos/bodoni/opentype/subscribers","subscription_url":"https://api.github.com/repos/bodoni/opentype/subscription","commits_url":"https://api.github.com/repos/bodoni/opentype/commits{/sha}","git_commits_url":"https://api.github.com/repos/bodoni/opentype/git/commits{/sha}","comments_url":"https://api.github.com/repos/bodoni/opentype/comments{/number}","issue_comment_url":"https://api.github.com/repos/bodoni/opentype/issues/comments{/number}","contents_url":"https://api.github.com/repos/bodoni/opentype/contents/{+path}","compare_url":"https://api.github.com/repos/bodoni/opentype/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bodoni/opentype/merges","archive_url":"https://api.github.com/repos/bodoni/opentype/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bodoni/opentype/downloads","issues_url":"https://api.github.com/repos/bodoni/opentype/issues{/number}","pulls_url":"https://api.github.com/repos/bodoni/opentype/pulls{/number}","milestones_url":"https://api.github.com/repos/bodoni/opentype/milestones{/number}","notifications_url":"https://api.github.com/repos/bodoni/opentype/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bodoni/opentype/labels{/name}","releases_url":"https://api.github.com/repos/bodoni/opentype/releases{/id}","deployments_url":"https://api.github.com/repos/bodoni/opentype/deployments","created_at":"2014-08-12T14:11:57Z","updated_at":"2016-10-04T02:23:50Z","pushed_at":"2016-10-09T11:46:02Z","git_url":"git://github.com/bodoni/opentype.git","ssh_url":"git@github.com:bodoni/opentype.git","clone_url":"https://github.com/bodoni/opentype.git","svn_url":"https://github.com/bodoni/opentype","homepage":"","size":2782,"stargazers_count":7,"watchers_count":7,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bodoni/opentype/pulls/6"},"html":{"href":"https://github.com/bodoni/opentype/pull/6"},"issue":{"href":"https://api.github.com/repos/bodoni/opentype/issues/6"},"comments":{"href":"https://api.github.com/repos/bodoni/opentype/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/bodoni/opentype/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/bodoni/opentype/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bodoni/opentype/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/bodoni/opentype/statuses/13d2d90316c2dc259ee78bac670233e80e37a6ec"}}}}
{"actor":{"display_login":"cbreeden"}}