Merge branch 'master' into seperation
This commit is contained in:
commit
9db8a38adc
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
|
*~
|
||||||
pdf.pdf
|
pdf.pdf
|
||||||
intelisa.pdf
|
intelisa.pdf
|
||||||
openweb_tm-PRINT.pdf
|
openweb_tm-PRINT.pdf
|
||||||
|
local.mk
|
||||||
|
5
Makefile
5
Makefile
@ -3,6 +3,9 @@ BUILD_DIR := build
|
|||||||
DEFAULT_BROWSERS := test/resources/browser_manifests/browser_manifest.json
|
DEFAULT_BROWSERS := test/resources/browser_manifests/browser_manifest.json
|
||||||
DEFAULT_TESTS := test/test_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.
|
# JS files needed for pdf.js.
|
||||||
# This list doesn't account for the 'worker' directory.
|
# This list doesn't account for the 'worker' directory.
|
||||||
PDF_JS_FILES = \
|
PDF_JS_FILES = \
|
||||||
@ -156,5 +159,5 @@ clean:
|
|||||||
help:
|
help:
|
||||||
@echo "Read the comments in the Makefile for guidance.";
|
@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
|
shell-msg lint clean web compiler help server
|
||||||
|
20
fonts.js
20
fonts.js
@ -15,20 +15,6 @@ var kMaxFontFileSize = 40000;
|
|||||||
*/
|
*/
|
||||||
var kMaxWaitForFontFace = 1000;
|
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
|
* Hold a map of decoded fonts and of the standard fourteen Type1 fonts and
|
||||||
* their acronyms.
|
* their acronyms.
|
||||||
@ -253,7 +239,7 @@ var FontLoader = {
|
|||||||
src += ' }';
|
src += ' }';
|
||||||
src += '</script></head><body>';
|
src += '</script></head><body>';
|
||||||
for (var i = 0; i < names.length; ++i) {
|
for (var i = 0; i < names.length; ++i) {
|
||||||
src += '<p style="font-family:\'' + fontName + '\'">Hi</p>';
|
src += '<p style="font-family:\'' + names[i] + '\'">Hi</p>';
|
||||||
}
|
}
|
||||||
src += '</body></html>';
|
src += '</body></html>';
|
||||||
var frame = document.createElement('iframe');
|
var frame = document.createElement('iframe');
|
||||||
@ -420,12 +406,10 @@ var Font = (function() {
|
|||||||
this.font = Fonts.lookup(name).data;
|
this.font = Fonts.lookup(name).data;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fontCount++;
|
|
||||||
fontName = name;
|
|
||||||
|
|
||||||
// If the font is to be ignored, register it like an already loaded font
|
// 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.
|
// to avoid the cost of waiting for it be be loaded by the platform.
|
||||||
if (properties.ignore || kDisableFonts) {
|
if (properties.ignore) {
|
||||||
Fonts.blacklistFont(name);
|
Fonts.blacklistFont(name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user