Skip to main content

deft_font_kit/sources/
mod.rs

1// font-kit/src/sources/mod.rs
2//
3// Copyright © 2018 The Pathfinder Project Developers.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11//! Various databases of installed fonts that can be queried.
12//!
13//! The system-specific sources (Core Text, DirectWrite, and Fontconfig) contain the fonts that are
14//! installed on the system. The remaining databases (`fs`, `mem`, and `multi`) allow `font-kit` to
15//! query fonts not installed on the system.
16
17#[cfg(any(target_os = "macos", target_os = "ios"))]
18pub mod core_text;
19
20#[cfg(target_family = "windows")]
21pub mod directwrite;
22
23#[cfg(any(
24    not(any(
25        target_os = "macos",
26        target_os = "ios",
27        target_family = "windows",
28        target_arch = "wasm32",
29        target_os="android",
30        target_env = "ohos",
31    )),
32    feature = "source-fontconfig"
33))]
34pub mod fontconfig;
35
36#[cfg(not(target_arch = "wasm32"))]
37pub mod fs;
38
39pub mod mem;
40
41pub mod multi;