zed-industries/zed · error

No localised string for

Error message

No localised string for {locale}

What it means

Raised in `get_name` (DirectWrite font metadata helper) after `FindLocaleName` fails to find the requested locale AND the DEFAULT_LOCALE_NAME fallback lookup also reports no matching localized string — the IDWriteLocalizedStrings genuinely has no entry for either locale, so the requested font property (family/face name) cannot be resolved.

Solutions

  1. Iterate all GetLocaleNameLength/GetLocaleName entries and pick the first available instead of failing.
  2. Fall back to index 0 of the localized strings collection as a last resort.
  3. Return an empty/placeholder name rather than erroring for cosmetic metadata lookups.
  4. Log the font identity alongside the error to identify the offending font file.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/gpui_windows/src/direct_write.rs:1839 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20). Data as JSON: /api/errors/df6391213a4589f8. Report an issue: GitHub.

Appendix: source

Thrown at crates/gpui_windows/src/direct_write.rs:1836

        direct_write_features.AddFontFeature(feature_calt)?;
    }

    Ok(())
}

#[inline]
const fn make_direct_write_feature(feature_name: &str, parameter: u32) -> DWRITE_FONT_FEATURE {
    let tag = make_direct_write_tag(feature_name);
    DWRITE_FONT_FEATURE {
        nameTag: tag,
        parameter,
    }
}

#[inline]
const fn make_open_type_tag(tag_name: &str) -> u32 {
    let bytes = tag_name.as_bytes();
    debug_assert!(bytes.len() == 4);
    u32::from_le_bytes([bytes[0], bytes[1], bytes[2], bytes[3]])
}

#[inline]
const fn make_direct_write_tag(tag_name: &str) -> DWRITE_FONT_FEATURE_TAG {
    DWRITE_FONT_FEATURE_TAG(make_open_type_tag(tag_name))
}

#[inline]
fn get_name(string: IDWriteLocalizedStrings, locale: &HSTRING) -> Result<String> {
    let mut locale_name_index = 0u32;
    let mut exists = BOOL(0);
    unsafe { string.FindLocaleName(locale, &mut locale_name_index, &mut exists as _)? };
    if !exists.as_bool() {
        unsafe {
            string.FindLocaleName(
                DEFAULT_LOCALE_NAME,
                &mut locale_name_index as _,

View on GitHub (pinned to 916fc2b8cb)