From 6eaad13132e6efda279ffc16cbddd0ce628b3f0c Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Wed, 6 Jul 2011 22:14:48 -0700 Subject: [PATCH 1/2] remove fontCount/fontName/kDisableFonts debug hacks and fix bug in font loading --- fonts.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/fonts.js b/fonts.js index f6620a0a0..2f6a550f8 100755 --- a/fonts.js +++ b/fonts.js @@ -15,20 +15,6 @@ var kMaxFontFileSize = 40000; */ var kMaxWaitForFontFace = 1000; -/** - * Useful for debugging when you want to certains operations depending on how - * many fonts are loaded. - */ -var fontCount = 0; -var fontName = ''; - -/** - * If for some reason one want to debug without fonts activated, it just need - * to turn this pref to true/false. - */ -var kDisableFonts = false; - - /** * Hold a map of decoded fonts and of the standard fourteen Type1 fonts and * their acronyms. @@ -253,7 +239,7 @@ var FontLoader = { src += ' }'; src += ''; for (var i = 0; i < names.length; ++i) { - src += '

Hi

'; + src += '

Hi

'; } src += ''; var frame = document.createElement('iframe'); @@ -420,12 +406,10 @@ var Font = (function() { this.font = Fonts.lookup(name).data; return; } - fontCount++; - fontName = name; // If the font is to be ignored, register it like an already loaded font // to avoid the cost of waiting for it be be loaded by the platform. - if (properties.ignore || kDisableFonts) { + if (properties.ignore) { Fonts.blacklistFont(name); return; } From eba0b18b19bb9951eb8fc4267a5670e616d1aed7 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 7 Jul 2011 12:51:48 -0400 Subject: [PATCH 2/2] allow custom rules to be defined in local.mk --- .gitignore | 2 ++ Makefile | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 95de9fb8e..9e2d0f211 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*~ pdf.pdf intelisa.pdf openweb_tm-PRINT.pdf +local.mk diff --git a/Makefile b/Makefile index c6971d025..9b2817fc4 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ BUILD_DIR := build DEFAULT_BROWSERS := test/resources/browser_manifests/browser_manifest.json DEFAULT_TESTS := test/test_manifest.json +# Let folks define custom rules for their clones. +-include local.mk + # JS files needed for pdf.js. # This list doesn't account for the 'worker' directory. PDF_JS_FILES = \ @@ -156,5 +159,5 @@ clean: help: @echo "Read the comments in the Makefile for guidance."; -.PHONY: all test browser-test font-test shell-test \ +.PHONY:: all test browser-test font-test shell-test \ shell-msg lint clean web compiler help server