Skip to content

Commit

Permalink
Fix: #5 reading one more number of glyphs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ynakajima committed Jan 22, 2013
1 parent 84d6bb2 commit 2427a5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ttf.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
var locaSize = (this.head.indexToLocFormat === 0) ? 2 : 4;
var locaRatio = (this.head.indexToLocFormat === 0) ? 2 : 1;

for ( var i = 0; i < this.maxp.numGlyphs + 1; i++) {
for ( var i = 0; i < this.maxp.numGlyphs; i++) {
this.loca.push(view["get" + locaType](locaOffset, false)
* locaRatio); // locaのタイプがshortだった場合、2で割った値が記録されている為2をかけて値を戻す
this.locaOffsetSize.push(locaOffset);
Expand Down

0 comments on commit 2427a5a

Please sign in to comment.