Comments (11)
Try using the following (a backslash followed by four hexadecimal digits that correspond to the Unicode scalar value of the character U+00AE):
feature ss01 {
featureNames {
name "\00AE";
};
[...]
} ss01;
from afdko.
I was under the impression that these names can only contain ASCII characters.
from afdko.
The stylistic names may be any encoding supported by the name table, which goes way beyond ASCII. See:
http://www.microsoft.com/typography/otspec/features_pt.htm#ssxx
The feature file supports only ASCII entry for name string values. Non-ascii characters must be represented by the character code in hexadecimal. See the feature file spec section '9.e name table'. This is because name table strings may be specified in many different encodings, and it is not necessarily possible to convert from a given text encoding in the feature file to the desired name string encoding. The simplest approach is to support only the most basic text encoding, and make the user responsible for anything more complex.
from afdko.
Well that was fast! thank you all for responding.
from afdko.
I have tried to escape the characters as shown below:
featureNames {
name "Superscript \00AE"; # Windows English
name 1 0 0 "Superscript \00AE"; # Mac English
name 3 1 0x040c "\00AE \00E0 l\2019exposant"; # Windows French
name 1 0 1 "\00AE \00E0 l\2019exposant"; # Mac French
};
This yields a "Bad string" error tho. Any idea?
from afdko.
Note that similar strings without escapes return no error.
from afdko.
My guess is that the first and third "name" strings are okay, because they refer to Unicode strings. Please try with only those lines. The second and fourth lines are referencing non-Unicode encodings, which are byte-based. You'll need to specify only two hexadecimal digits after the backslash, for the characters that correspond to U+00AE, U+00E0, and U+2019.
from afdko.
The problem is that the two name strings for the Mac platform are using 4 digit hex values. For the Mac platform, Roman script, the encoding values are 1 byte values, and must be represented as 2 digit hexadecimal values, e.g "\AE" rather than "\00AE". If you take out the leasing zeroes for those two strings, I think it will work.
from afdko.
The Macintosh Roman equivalents of U+00AE, U+00E0, and U+2019 are 0xA8, ("\A8"), 0x88 ("\88"), and 0xD5 ("\D5"). Wikipedia's Mac OS Roman page may be helpful.
from afdko.
It works and passes makeotf, thanks Ken, Read. Cheers.
from afdko.
Our pleasure. ☺
from afdko.
Related Issues (20)
- [otfstemhist] cannot specify glyphs via external glyph list
- [otfstemhist] -h reports unrelated options, wrong tool name HOT 1
- Unify format of external glyph names files across AFDKO tools
- [otfautohint/otfstemhist] Add tests
- use TTX tools to compile a otf file HOT 10
- [spot] alternate metrics ignored in class kern proof
- [otfautohint] (minor) outdated tool names
- [otfautohint] points “optimized away” in flex-like scenario (print only) HOT 15
- [tx] Crashing without error when using -decid option in -t1 mode
- Reordering of ligature substitution rules is considered harmful HOT 10
- [otfautohint] Mishinting of glyph? HOT 7
- [otfautohint] Consider adding flag to selectively skip overlap processing for some glyphs
- [makeotf] silently fails when GOADB has unexpected data
- [makeinstancesufo] & [checkoutlinesufo] multiprocessing vs progress bar, output improvement
- building fails on manjaro HOT 2
- [makeotf] substitution without target item does not fail HOT 8
- Pytest Error Encountered During AFDKO Compilation on Arch Linux HOT 6
- [checkoutlinesufo] XMLSyntaxError reading fontinfo.plist of temp UFO font HOT 3
- [makeotf] -r reports all unhinted glyphs individually HOT 1
- [buildmasterotfs] incompatible sources produced HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from afdko.