Back to API Reference
Class
LanguageRegistry
static
Process-wide registry mapping BCP 47 language tags to HarfBuzz language handles and compact byte indices suitable for per-codepoint attribute storage.
Remarks
HarfBuzz language handles (hb_language_t) are opaque pointers cached internally by HarfBuzz, so equal BCP 47 strings resolve to the same pointer. HarfBuzz maps BCP 47 to OpenType language tags (e.g. zh-Hans → ZHS, ja → JAN) automatically, which drives the locl GSUB feature in pan-CJK fonts. The registry is additive: once a tag is registered, its index stays stable for the lifetime of the process. Index 0 is reserved for "unset" and maps to HB_LANGUAGE_INVALID.
public static IntPtr GetHandle()Returns the HarfBuzz language handle for a registry index, or Zero if unset.
