]> git.parisson.com Git - pdf.js.git/commitdiff
Let Chrome (and others?) show TrueType fonts
authorVivien Nicolas <21@vingtetun.org>
Sun, 3 Jul 2011 20:29:46 +0000 (22:29 +0200)
committerVivien Nicolas <21@vingtetun.org>
Sun, 3 Jul 2011 20:29:46 +0000 (22:29 +0200)
fonts.js

index ebbd0c0b8f0698ee93a2549a42812359a5053c34..12d7ce82ea3fa759d2f597112ffc379285cc66b7 100644 (file)
--- a/fonts.js
+++ b/fonts.js
@@ -905,7 +905,7 @@ var Font = (function () {
 
         // Tables needs to be written by ascendant alphabetic order
         tables.sort(function tables_sort(a, b) {
-          return a.tag > b.tag;
+          return (a.tag > b.tag) - (a.tag < b.tag);
         });
 
         // rewrite the tables but tweak offsets