use super::*;
pub(crate) static EXTERNAL_GLYPH_RASTERIZER: AtomicPtr<()> = AtomicPtr::new(null_mut());
#[cfg(any(target_os = "linux", target_os = "android"))]
pub(crate) static FREETYPE_LIB: OnceLock<Option<FreeTypeLib>> = OnceLock::new();
#[cfg(target_os = "android")]
pub(crate) static ANDROID_FONT_MATCHER_LIB: OnceLock<Option<AndroidFontMatcherLib>> =
OnceLock::new();
#[cfg(target_os = "windows")]
pub(crate) static DWRITE_LIB: OnceLock<Option<DirectWriteLib>> = OnceLock::new();
thread_local! {
pub(crate) static THREAD_PRIMARY_FONT_BINDS: Cell<usize> = const { Cell::new(0) };
pub(crate) static THREAD_FALLBACK_FONT_LOADS: Cell<usize> = const { Cell::new(0) };
}
#[cfg(any(target_os = "macos", target_os = "ios"))]
thread_local! {
pub(crate) static CORETEXT_FONT_CACHE: RefCell<CoreTextFontCache> = const { RefCell::new(CoreTextFontCache::new()) };
}
#[cfg(target_os = "windows")]
thread_local! {
pub(crate) static WIN32_FONT_CACHE: RefCell<Win32FontCache> = const { RefCell::new(Win32FontCache::new()) };
}
#[cfg(any(target_os = "linux", target_os = "android"))]
thread_local! {
pub(crate) static FREETYPE_RUNTIME_CACHE: RefCell<Option<Option<FreeTypeRuntime>>> = const { RefCell::new(None) };
}
#[cfg(target_arch = "wasm32")]
thread_local! {
pub(crate) static WEB_FONT_SCRATCH: RefCell<WebFontScratch> = const { RefCell::new(WebFontScratch::new()) };
}