forked from rnewman/services-central-old
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 631479. Simple reftests of graphite font handling (if enabled). r…
…=jfkthame
- Loading branch information
John Daggett
committed
Dec 9, 2011
1 parent
f5e2656
commit 9848a8f
Showing
22 changed files
with
96,456 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
Test fonts with Graphite tables for testing | ||
|
||
Original font: League Gothic by League of Moveable Type, converted to TT via FontSquirrel | ||
|
||
Kerning, GDEF/GSUB/GPOS info stripped out and the name table edited to | ||
produce grtest-template.ttx. | ||
|
||
Making a test font: | ||
|
||
1. Build ttx from template | ||
sed -e 's/xxxfontnamexxx/grtestxxx/' grtest-template.ttx >grtestxxx-src.ttx | ||
|
||
2. Make the font | ||
ttx grtestxxx-src.ttx | ||
|
||
3. Edit GDL file | ||
|
||
4. Compile the GDL into the ttf | ||
|
||
../graphite-compiler.sh -d -v3 -w3521 -w510 font.gdl grtestxxx-src.ttf grtestxxx.ttf | ||
|
||
Where graphite-compiler.sh is a script to run the graphite compiler in wine on OSX | ||
(the compiler is available both as a Windows exe and as source). | ||
|
||
Graphite compiler download: | ||
http://scripts.sil.org/cms/scripts/page.php?item_id=GraphiteCompilerDownload | ||
|
||
grtest-simple.ttf | ||
Simple FAIL ==> PaSs substitution via graphite or via OT with TST1=1 | ||
|
||
grtest-multipass.ttf | ||
Several passes where the end result is FAIL ==> PaSs or via OT with TST1=1 | ||
|
||
grtest-langfeat.ttf | ||
FAIL ==> PaSs substitution enabled via language or feature settings or via OT with TST1=1 | ||
|
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,62 @@ | ||
#include "stddef.gdh" | ||
#define LG_USENG 1033 | ||
|
||
table(glyph) | ||
clsFail = codepoint("FAIL"); | ||
clsPass = codepoint("PaSs"); | ||
endtable | ||
|
||
table (feature) | ||
|
||
failtopass | ||
{ | ||
id = "FTPS"; | ||
name.LG_USENG = string("Pass substitution"); | ||
default = 0; | ||
} | ||
|
||
failtopass2 | ||
{ | ||
id = "FTP2"; | ||
name.LG_USENG = string("Pass substitution 2"); | ||
default = 0; | ||
} | ||
|
||
passtofail | ||
{ | ||
id = "PTFL"; | ||
name.LG_USENG = string("Pass to fail substitution"); | ||
default = 0; | ||
} | ||
|
||
endtable | ||
|
||
table (language) | ||
|
||
french { | ||
languages = ( "fr" ); | ||
failtopass = 1; | ||
} | ||
|
||
french2 { | ||
languages = ( "fra" ); | ||
passtofail = 1; | ||
} | ||
|
||
endtable; | ||
|
||
table(substitution) | ||
|
||
pass(1) | ||
|
||
if (failtopass || failtopass2) | ||
clsFail > clsPass; | ||
endif; | ||
|
||
if (passtofail) | ||
clsPass > clsFail; | ||
endif; | ||
|
||
endpass; | ||
|
||
endtable |
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,49 @@ | ||
#include "stddef.gdh" | ||
|
||
table(glyph) | ||
gSpace = codepoint(" "); | ||
|
||
gA = codepoint("A"); | ||
gB = codepoint("B"); | ||
gC = codepoint("C"); | ||
gF = codepoint("F"); | ||
gI = codepoint("I"); | ||
gL = codepoint("L"); | ||
gP = codepoint("P"); | ||
gS = codepoint("S"); | ||
ga = codepoint("a"); | ||
gs = codepoint("s"); | ||
g1 = codepoint("1"); | ||
g2 = codepoint("2"); | ||
g3 = codepoint("3"); | ||
g4 = codepoint("4"); | ||
|
||
clsFail = codepoint("FAIL"); | ||
clsPass = codepoint("PaSs"); | ||
cls1234 = codepoint("1234"); | ||
cls5678 = codepoint("5678"); | ||
endtable | ||
|
||
table(substitution) | ||
|
||
pass(1) | ||
clsFail > cls1234; | ||
endpass; | ||
|
||
pass(2) | ||
cls1234 > @1 @1; | ||
endpass; | ||
|
||
pass(3) | ||
cls1234 cls1234 > @1 cls5678; | ||
endpass; | ||
|
||
pass(4) | ||
cls1234 cls5678 > _ clsFail; | ||
endpass; | ||
|
||
pass(5) | ||
gF gA gI gL > gP ga gS gs; | ||
endpass; | ||
|
||
endtable |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.