fontlab_glyport.glyphsapp.defaults
defaults
Glyphs.defaults/boolDefaults/intDefaults over an injected mapping.
Coercion mirrors NSUserDefaults boolForKey:/integerForKey: as used by the
Glyphs SDK wrapper (GlyphsApp/init.py BoolDefaultsProxy/IntDefaultsProxy):
- bool: missing/None -> False; bool as is; int/float -> nonzero; str -> True when,
after leading whitespace, an optional sign and leading zeros, it starts with
Y, y, T, t or a digit 1-9 (NSString
boolValue); anything else -> False. - int: missing/None -> 0; bool -> 0/1; int as is; finite float -> truncated
toward zero; non-finite float -> 0; str -> its leading optionally signed
digits (
"3.7"-> 3,"x1"-> 0, NSStringintegerValue); else 0.
Classes
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
DEFAULTS_ENV |
attribute | ||
DEFAULTS_PATH |
attribute | ||
Store |
attribute | ||
as_bool |
function | (value: object) -> bool |
|
as_int |
function | (value: object) -> int |
|
default_defaults_path |
function | () -> Path |
Where persisted <code>Glyphs.defaults</code> live unless the caller picks a store. |
register_default |
function | (store: Store, key: str, value: Any) -> None |
Set <code>key</code> only when absent (simplified registration; see README). |