-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8be05d8
commit 9ecb7d2
Showing
10 changed files
with
178 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package { | ||
|
||
import flash.display.MovieClip; | ||
import flash.text.Font; | ||
import flash.utils.describeType; | ||
|
||
|
||
public class Test extends MovieClip { | ||
|
||
|
||
public function Test() { | ||
trace("// var fonts = enumerateFonts(false)"); | ||
var fonts = Font.enumerateFonts(false); | ||
|
||
trace("// fonts.length"); | ||
trace(fonts.length); | ||
trace(""); | ||
|
||
for (var i = 0; i < fonts.length; i++) { | ||
dumpFont("fonts[" + i + "]", fonts[i]); | ||
} | ||
|
||
dumpFont("new Font1()", new Font1()); | ||
dumpFont("new Font()", new Font()); | ||
} | ||
|
||
function dumpFont(name: String, font: Font) { | ||
trace("// " + name + ".fontName"); | ||
trace(font.fontName); | ||
trace(""); | ||
|
||
trace("// " + name + ".fontStyle"); | ||
trace(font.fontStyle); | ||
trace(""); | ||
|
||
trace("// " + name + ".fontType"); | ||
trace(font.fontType); | ||
trace(""); | ||
|
||
trace("// " + name + " is Font1"); | ||
trace(font is Font1); | ||
trace(""); | ||
|
||
trace(""); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// var fonts = enumerateFonts(false) | ||
// fonts.length | ||
1 | ||
|
||
// fonts[0].fontName | ||
Source Code Pro | ||
|
||
// fonts[0].fontStyle | ||
bold | ||
|
||
// fonts[0].fontType | ||
embedded | ||
|
||
// fonts[0] is Font1 | ||
false | ||
|
||
|
||
// new Font1().fontName | ||
Source Code Pro | ||
|
||
// new Font1().fontStyle | ||
bold | ||
|
||
// new Font1().fontType | ||
embedded | ||
|
||
// new Font1() is Font1 | ||
true | ||
|
||
|
||
// new Font().fontName | ||
null | ||
|
||
// new Font().fontStyle | ||
null | ||
|
||
// new Font().fontType | ||
null | ||
|
||
// new Font() is Font1 | ||
false | ||
|
||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# There's a CFF (definefont4) font embedded here, which should **not** show up in the list until referenced by something | ||
# (which it won't be) | ||
|
||
num_frames = 1 |