pomax / cff-opcode-fonts Goto Github PK
View Code? Open in Web Editor NEWOTF fonts for testing CFF opcode support
OTF fonts for testing CFF opcode support
The charstring
700 700 and
0 rmoveto
0 700 rlineto
700 0 rlineto
0 -700 rlineto
-700 0 rlineto
endchar
is equalivent to
1 0 rmoveto
0 700 rlineto
700 0 rlineto
0 -700 rlineto
-700 0 rlineto
endchar
The FontForge's result shows the first point at (1, 0) either).
There's another opcode random.
Though I think nobody supports it.
The CFF random operator is defined to return a real number between (0..1] -- this should multiply 700 rather than be treated as a coordinate itself to allow a more visual inspection of the result:
0 0 rmoveto
0 700 random mul rlineto
700 random mul 0 rlineto
0 -700 random mul rlineto
-700 random mul 0 rlineto
Note also that the PRNG seed can be defined in the font itself as 'initialRandomSeed' in the font's Private DICT.
(Nearly moot because many implementations still ignore the CFF random operator and at least some Adobe apps rewrite the font to include their own random value as a number(!) -- maybe related to CFF2?)
Would you be interested in contributing your cff-opcode-fonts to Unicode’s text rendering tests at https://github.com/unicode-org/text-rendering-tests ? See here to get an idea of current test coverage. The goal of Unicode’s test suite is to make text rendering more reliable across platforms, so your CFF test fonts would make a great addition. If you’re interested in contributing, just make a pull request for adding the font files to the fonts directory. A bot will then ask you to confirm (by clicking a form) that you’re OK with Unicode’s Contributor License Agreement. Once your fonts are part of Unicode’s repo, I’ll gladly set up the test framework so it checks whether the implementation-under-test renders your fonts as expected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.