mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-21 01:44:57 +01:00
Merge pull request #4130 from xbirks/fix/windows-gdi-only-fonts
Windows fonts: list the fonts only GDI has loaded, such as Creative Cloud's Adobe Fonts (#1258)
This commit is contained in:
5 files changed
+255
-29
No files matched your search
@@ -32,10 +32,11 @@ log = { workspace = true }
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winsafe = { version = "0.0.29", default-features = false, features = ["kernel", "psapi"] }
|
||||
|
||||
# DirectWrite's system font collection (the desktop app's src/system_fonts.rs, shared): fonts that
|
||||
# font services such as Adobe Fonts load in place (#579). MIT OR Apache-2.0.
|
||||
# DirectWrite's system font collection and GDI's font list (the desktop app's src/system_fonts.rs,
|
||||
# shared): fonts that font services such as Adobe Fonts load in place (#579, #1258). MIT OR
|
||||
# Apache-2.0.
|
||||
[target.'cfg(all(windows, not(target_vendor = "win7")))'.dependencies]
|
||||
windows = { version = "0.62", features = ["Win32_Graphics_DirectWrite"] }
|
||||
windows = { version = "0.62", features = ["Win32_Graphics_DirectWrite", "Win32_Graphics_Gdi"] }
|
||||
|
||||
# CoreText's font manager (the desktop app's src/mac_fonts.rs, shared): fonts that apps and font
|
||||
# managers register from their own folders (#579). Zlib OR Apache-2.0 OR MIT.
|
||||
|
||||
@@ -50,13 +50,14 @@ clipboard-win = { workspace = true }
|
||||
# Win32 (MIT); the `user` feature is User32.dll only. Only the wgpu renderer chooses an adapter.
|
||||
winsafe = { version = "0.0.29", default-features = false, features = ["user"], optional = true }
|
||||
|
||||
# DirectWrite's system font collection (src/system_fonts.rs): fonts that font services such as
|
||||
# Adobe Fonts load in place (#579). MIT OR Apache-2.0, already in the build through accesskit.
|
||||
# DirectWrite's system font collection and GDI's font list (src/system_fonts.rs): fonts that font
|
||||
# services such as Adobe Fonts load in place (#579, #1258). MIT OR Apache-2.0, already in the build
|
||||
# through accesskit.
|
||||
# Win32_UI_WindowsAndMessaging has `MSG` and `WM_POINTERDOWN`, which src/windows_stylus.rs uses to
|
||||
# read a pen's barrel button from its pointer messages. Win32_UI_Input_Pointer has
|
||||
# `GetPointerPenInfo`, which it uses to read the pen's pressure and which end of the pen is down.
|
||||
[target.'cfg(all(windows, not(target_vendor = "win7")))'.dependencies]
|
||||
windows = { version = "0.62", features = ["Win32_Graphics_DirectWrite", "Win32_UI_Input_Pointer", "Win32_UI_WindowsAndMessaging"] }
|
||||
windows = { version = "0.62", features = ["Win32_Graphics_DirectWrite", "Win32_Graphics_Gdi", "Win32_UI_Input_Pointer", "Win32_UI_WindowsAndMessaging"] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
# The macOS menu bar (src/mac_menu.rs): Tauri's menu crate, AppKit menus behind a safe API (no GTK
|
||||
|
||||
@@ -1,39 +1,56 @@
|
||||
//! Windows: the font files in DirectWrite's system font collection, scanned with the font folders
|
||||
//! (`vectorcraft_text::set_platform_font_files`). The desktop app and `vectorcraft-cli` (exports,
|
||||
//! MCP) both install it; the CLI shares this file.
|
||||
//! Windows: the font files in DirectWrite's system font collection and those of the fonts GDI has
|
||||
//! loaded, scanned with the font folders (`vectorcraft_text::set_platform_font_files`). The desktop
|
||||
//! app and `vectorcraft-cli` (exports, MCP) both install it; the CLI shares this file.
|
||||
//!
|
||||
//! Font services such as Adobe Fonts load their fonts with GDI at run time, from files in their
|
||||
//! own folders, without installing them: the font folders and the registry don't list them. Since
|
||||
//! Windows 10 (version 1607) DirectWrite's system font collection holds them too
|
||||
//! Windows 10 (version 1607) DirectWrite's system font collection is meant to hold them too
|
||||
//! (<https://learn.microsoft.com/windows/win32/directwrite/what-s-new-in-directwrite-for-windows-8-consumer-preview>,
|
||||
//! "Support for Adobe Typekit and other font-service clients"), so VectorCraft lists them as other
|
||||
//! apps do, reading the files in place (#579).
|
||||
//! apps do, reading the files in place (#579). It doesn't always: on some machines the fonts
|
||||
//! Creative Cloud loads are in GDI's font list (Word and the font dialogs show them) but not in
|
||||
//! the collection (#1258). So the families GDI lists that the collection doesn't name are asked
|
||||
//! for one by one: a GDI font selected into a device context gives the DirectWrite font face
|
||||
//! GDI uses (`IDWriteGdiInterop::CreateFontFaceFromHdc`), and that face its files.
|
||||
//!
|
||||
//! DirectWrite is COM, which has no safe API, hence the scoped `unsafe_code` allowance.
|
||||
//! DirectWrite is COM and GDI a C API, neither with a safe API, hence the scoped `unsafe_code`
|
||||
//! allowance.
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
use std::collections::{BTreeMap, BTreeSet};
|
||||
use std::sync::Mutex;
|
||||
|
||||
use windows::Win32::Foundation::LPARAM;
|
||||
use windows::Win32::Graphics::DirectWrite::{
|
||||
DWRITE_FACTORY_TYPE_SHARED, DWriteCreateFactory, IDWriteFactory3, IDWriteFontSet, IDWriteLocalFontFileLoader,
|
||||
DWRITE_FACTORY_TYPE_SHARED, DWRITE_FONT_PROPERTY_ID_WIN32_FAMILY_NAME, DWriteCreateFactory, IDWriteFactory3, IDWriteFontFile, IDWriteFontSet,
|
||||
IDWriteGdiInterop, IDWriteLocalFontFileLoader, IDWriteStringList,
|
||||
};
|
||||
use windows::Win32::Graphics::Gdi::{
|
||||
CreateCompatibleDC, CreateFontIndirectW, DEFAULT_CHARSET, DeleteDC, DeleteObject, EnumFontFamiliesExW, HDC, HGDIOBJ, LOGFONTW, RASTER_FONTTYPE,
|
||||
SelectObject, TEXTMETRICW,
|
||||
};
|
||||
use windows::core::Interface;
|
||||
|
||||
/// The most fonts read from the collection (a system has a few thousand).
|
||||
const MAX_FONTS: u32 = 1 << 16;
|
||||
/// The most families and faces taken from GDI's font list.
|
||||
const MAX_GDI_FONTS: usize = 1 << 16;
|
||||
/// The most files one font face is made of (one, but for a few Type 1 fonts).
|
||||
const MAX_FACE_FILES: u32 = 8;
|
||||
/// The longest file path taken, in UTF-16 units (Windows' own limit).
|
||||
const MAX_PATH: u32 = 32_767;
|
||||
|
||||
/// Have the font scans read the font files DirectWrite lists.
|
||||
/// Have the font scans read the font files DirectWrite and GDI list.
|
||||
pub fn install() {
|
||||
vectorcraft_text::set_platform_font_files(font_files);
|
||||
}
|
||||
|
||||
/// The local files of the fonts in DirectWrite's system font collection as it is now (fonts
|
||||
/// loaded since the last call included). None before Windows 10, or when DirectWrite fails: the
|
||||
/// font folders and the registry still list the installed fonts.
|
||||
/// loaded since the last call included), with those of the fonts GDI lists that the collection
|
||||
/// leaves out. None before Windows 10, or when DirectWrite fails: the font folders and the
|
||||
/// registry still list the installed fonts.
|
||||
fn font_files() -> Vec<String> {
|
||||
match collection_files() {
|
||||
match listed_files() {
|
||||
Ok(files) => files.into_iter().collect(),
|
||||
Err(e) => {
|
||||
log::debug!("DirectWrite's system fonts aren't listed: {e}");
|
||||
@@ -42,30 +59,48 @@ fn font_files() -> Vec<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fn collection_files() -> windows::core::Result<BTreeSet<String>> {
|
||||
fn listed_files() -> windows::core::Result<BTreeSet<String>> {
|
||||
// SAFETY: plain DirectWrite calls on interfaces it returned, each checked for failure; the
|
||||
// collection is asked to check for fonts loaded since the factory last looked.
|
||||
let set = unsafe {
|
||||
let (factory, set) = unsafe {
|
||||
let factory: IDWriteFactory3 = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED)?;
|
||||
let mut collection = None;
|
||||
factory.GetSystemFontCollection(false, &mut collection, true)?;
|
||||
let Some(collection) = collection else { return Ok(BTreeSet::new()) };
|
||||
collection.GetFontSet()?
|
||||
(factory, collection.map(|c| c.GetFontSet()).transpose()?)
|
||||
};
|
||||
let mut files = set.as_ref().map(collection_files).unwrap_or_default();
|
||||
// GDI's own names for the collection's families, the names GDI lists them by.
|
||||
// SAFETY: a list DirectWrite returns, read by `strings`.
|
||||
let named = set.as_ref().and_then(|s| unsafe { s.GetPropertyValues(DWRITE_FONT_PROPERTY_ID_WIN32_FAMILY_NAME) }.ok());
|
||||
let named: BTreeSet<String> = named.as_ref().map(strings).unwrap_or_default().iter().map(|n| n.to_lowercase()).collect();
|
||||
match gdi_files(&factory, &named) {
|
||||
Ok(more) => files.extend(more),
|
||||
Err(e) => log::debug!("GDI's fonts aren't listed: {e}"),
|
||||
}
|
||||
Ok(files)
|
||||
}
|
||||
|
||||
fn collection_files(set: &IDWriteFontSet) -> BTreeSet<String> {
|
||||
// SAFETY: a count of the set's fonts.
|
||||
let count = unsafe { set.GetFontCount() }.min(MAX_FONTS);
|
||||
// Faces of one file (a collection's, a variable font's instances) name it once.
|
||||
Ok((0..count).filter_map(|i| local_path(&set, i)).collect())
|
||||
(0..count).filter_map(|i| local_path(set, i)).collect()
|
||||
}
|
||||
|
||||
/// The path of the file holding font `i` of `set`, when it is a local file (not a downloadable
|
||||
/// font, nor one in memory).
|
||||
fn local_path(set: &IDWriteFontSet, i: u32) -> Option<String> {
|
||||
// SAFETY: `i` is below the set's count; the key DirectWrite hands back stays valid while
|
||||
// `file` (which owns it) lives, and is passed back with its own size; the path buffer is
|
||||
// sized from DirectWrite's answer plus the terminating NUL.
|
||||
// SAFETY: `i` is below the set's count.
|
||||
let file = unsafe { set.GetFontFaceReference(i).ok()?.GetFontFile().ok()? };
|
||||
file_path(&file)
|
||||
}
|
||||
|
||||
/// The path of `file`, when it is a local file.
|
||||
fn file_path(file: &IDWriteFontFile) -> Option<String> {
|
||||
// SAFETY: the key DirectWrite hands back stays valid while `file` (which owns it) lives, and is
|
||||
// passed back with its own size; the path buffer is sized from DirectWrite's answer plus the
|
||||
// terminating NUL.
|
||||
unsafe {
|
||||
let file = set.GetFontFaceReference(i).ok()?.GetFontFile().ok()?;
|
||||
let loader: IDWriteLocalFontFileLoader = file.GetLoader().ok()?.cast().ok()?;
|
||||
let (mut key, mut size) = (std::ptr::null_mut(), 0u32);
|
||||
file.GetReferenceKey(&mut key, &mut size).ok()?;
|
||||
@@ -79,6 +114,159 @@ fn local_path(set: &IDWriteFontSet, i: u32) -> Option<String> {
|
||||
}
|
||||
}
|
||||
|
||||
/// The strings of `list`.
|
||||
fn strings(list: &IDWriteStringList) -> Vec<String> {
|
||||
// SAFETY: indices below the list's count; each buffer is sized from DirectWrite's answer plus
|
||||
// the terminating NUL.
|
||||
let count = unsafe { list.GetCount() }.min(MAX_FONTS);
|
||||
(0..count)
|
||||
.filter_map(|i| unsafe {
|
||||
let len = list.GetStringLength(i).ok()?;
|
||||
if len > MAX_PATH {
|
||||
return None;
|
||||
}
|
||||
let mut s = vec![0u16; len as usize + 1];
|
||||
list.GetString(i, &mut s).ok()?;
|
||||
Some(String::from_utf16_lossy(s.get(..len as usize)?))
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// A memory device context, deleted when dropped.
|
||||
struct MemoryDc(HDC);
|
||||
|
||||
impl MemoryDc {
|
||||
fn new() -> windows::core::Result<Self> {
|
||||
// SAFETY: a device context compatible with the screen, owned by the guard.
|
||||
let dc = unsafe { CreateCompatibleDC(None) };
|
||||
if dc.is_invalid() { Err(windows::core::Error::from_thread()) } else { Ok(Self(dc)) }
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for MemoryDc {
|
||||
fn drop(&mut self) {
|
||||
// SAFETY: the guard's own device context, with its first font back in it.
|
||||
// Failing to delete it leaks a handle, which there's nothing to do about.
|
||||
let _ = unsafe { DeleteDC(self.0) };
|
||||
}
|
||||
}
|
||||
|
||||
/// The files of the faces of the font families GDI lists that DirectWrite's collection doesn't
|
||||
/// name (`named`, lower case).
|
||||
fn gdi_files(factory: &IDWriteFactory3, named: &BTreeSet<String>) -> windows::core::Result<BTreeSet<String>> {
|
||||
// SAFETY: a DirectWrite call checked for failure.
|
||||
let interop = unsafe { factory.GetGdiInterop()? };
|
||||
let dc = MemoryDc::new()?;
|
||||
let mut families = BTreeSet::new();
|
||||
enum_fonts(&dc, [0; 32], add_family, &mut families);
|
||||
let mut faces = Vec::new();
|
||||
for family in families.iter().filter(|f| !named.contains(&face_name(f).to_lowercase())) {
|
||||
enum_fonts(&dc, *family, add_face, &mut faces);
|
||||
}
|
||||
// A face listed once for each of its character sets is read once.
|
||||
faces.sort_by_key(face_key);
|
||||
faces.dedup_by_key(|f| face_key(f));
|
||||
// Asking for a face's files takes about a third of a millisecond, and the fonts are looked at
|
||||
// every few seconds (#2576): the faces still listed keep the files they had while those exist.
|
||||
// A face no longer listed is forgotten, so one activated again is asked for anew, and one
|
||||
// whose files couldn't be read (GDI or DirectWrite failed, or it has no local file) is asked
|
||||
// again at the next look.
|
||||
let mut known = KNOWN_FACES.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let mut now = BTreeMap::new();
|
||||
for f in &faces {
|
||||
let key = face_key(f);
|
||||
let files = match known.remove(&key) {
|
||||
Some(files) if !files.is_empty() && files.iter().all(|p| std::path::Path::new(p).is_file()) => files,
|
||||
_ => face_files(&interop, &dc, f),
|
||||
};
|
||||
now.insert(key, files);
|
||||
}
|
||||
*known = now;
|
||||
Ok(known.values().flatten().cloned().collect())
|
||||
}
|
||||
|
||||
/// A GDI face: its name (NUL-padded), weight and whether it's italic.
|
||||
type FaceKey = ([u16; 32], i32, u8);
|
||||
|
||||
fn face_key(f: &LOGFONTW) -> FaceKey {
|
||||
(f.lfFaceName, f.lfWeight, f.lfItalic)
|
||||
}
|
||||
|
||||
/// The files of the faces GDI listed at the last look ([`gdi_files`]).
|
||||
static KNOWN_FACES: Mutex<BTreeMap<FaceKey, Vec<String>>> = Mutex::new(BTreeMap::new());
|
||||
|
||||
/// Have GDI call `add` with `out` for each font of the family named `family` (NUL-padded), or for
|
||||
/// one font of each family when it's empty.
|
||||
fn enum_fonts<T>(
|
||||
dc: &MemoryDc,
|
||||
family: [u16; 32],
|
||||
add: unsafe extern "system" fn(*const LOGFONTW, *const TEXTMETRICW, u32, LPARAM) -> i32,
|
||||
out: &mut T,
|
||||
) {
|
||||
let query = LOGFONTW { lfCharSet: DEFAULT_CHARSET, lfFaceName: family, ..Default::default() };
|
||||
// SAFETY: `add` reads the fonts GDI passes and casts the LPARAM back to the `T` it is, which
|
||||
// outlives the call (GDI calls back before returning). Its answer is the last callback's.
|
||||
let _ = unsafe { EnumFontFamiliesExW(dc.0, &query, Some(add), LPARAM(std::ptr::from_mut(out) as isize), 0) };
|
||||
}
|
||||
|
||||
/// A GDI font list callback adding the font's family name to the `BTreeSet<[u16; 32]>` in `out`.
|
||||
unsafe extern "system" fn add_family(font: *const LOGFONTW, _: *const TEXTMETRICW, kind: u32, out: LPARAM) -> i32 {
|
||||
// SAFETY: GDI passes a valid font, and `out` is the set `enum_fonts` was given.
|
||||
let (Some(font), Some(out)) = (unsafe { font.as_ref() }, unsafe { (out.0 as *mut BTreeSet<[u16; 32]>).as_mut() }) else {
|
||||
return 0;
|
||||
};
|
||||
// Bitmap fonts have no file DirectWrite reads; `@` names are vertical writing's copies.
|
||||
if kind & RASTER_FONTTYPE == 0 && font.lfFaceName.first().is_some_and(|&c| c != 0 && c != u16::from(b'@')) {
|
||||
out.insert(font.lfFaceName);
|
||||
}
|
||||
i32::from(out.len() < MAX_GDI_FONTS)
|
||||
}
|
||||
|
||||
/// A GDI font list callback adding the font to the `Vec<LOGFONTW>` in `out`.
|
||||
unsafe extern "system" fn add_face(font: *const LOGFONTW, _: *const TEXTMETRICW, kind: u32, out: LPARAM) -> i32 {
|
||||
// SAFETY: GDI passes a valid font, and `out` is the list `enum_fonts` was given.
|
||||
let (Some(font), Some(out)) = (unsafe { font.as_ref() }, unsafe { (out.0 as *mut Vec<LOGFONTW>).as_mut() }) else {
|
||||
return 0;
|
||||
};
|
||||
if kind & RASTER_FONTTYPE == 0 {
|
||||
out.push(*font);
|
||||
}
|
||||
i32::from(out.len() < MAX_GDI_FONTS)
|
||||
}
|
||||
|
||||
/// `name`, NUL-padded, as a string.
|
||||
fn face_name(name: &[u16; 32]) -> String {
|
||||
String::from_utf16_lossy(name.split(|&c| c == 0).next().unwrap_or_default())
|
||||
}
|
||||
|
||||
/// The local files of the DirectWrite font face GDI uses for `font`.
|
||||
fn face_files(interop: &IDWriteGdiInterop, dc: &MemoryDc, font: &LOGFONTW) -> Vec<String> {
|
||||
// SAFETY: the font is selected into the guard's device context only while DirectWrite reads
|
||||
// it, then the context's own font goes back and the font is deleted; the files array is
|
||||
// sized from DirectWrite's count.
|
||||
unsafe {
|
||||
let gdi_font = CreateFontIndirectW(font);
|
||||
if gdi_font.is_invalid() {
|
||||
return Vec::new();
|
||||
}
|
||||
let first = SelectObject(dc.0, HGDIOBJ::from(gdi_font));
|
||||
let face = interop.CreateFontFaceFromHdc(dc.0);
|
||||
SelectObject(dc.0, first);
|
||||
// Failing to delete it leaks a handle, which there's nothing to do about.
|
||||
let _ = DeleteObject(HGDIOBJ::from(gdi_font));
|
||||
let Ok(face) = face else { return Vec::new() };
|
||||
let mut count = 0;
|
||||
if face.GetFiles(&mut count, None).is_err() || count == 0 || count > MAX_FACE_FILES {
|
||||
return Vec::new();
|
||||
}
|
||||
let mut files = vec![None; count as usize];
|
||||
if face.GetFiles(&mut count, Some(files.as_mut_ptr())).is_err() {
|
||||
return Vec::new();
|
||||
}
|
||||
files.iter().flatten().filter_map(file_path).collect()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
/// DirectWrite lists the installed fonts, by their files' full paths.
|
||||
@@ -89,4 +277,34 @@ mod tests {
|
||||
let fonts = std::path::Path::new(&std::env::var("WINDIR").unwrap()).join("Fonts").to_string_lossy().to_lowercase();
|
||||
assert!(files.iter().any(|f| f.to_lowercase().starts_with(&fonts)), "{} files, {:?}", files.len(), files.first());
|
||||
}
|
||||
|
||||
/// A font loaded with GDI from a file without an extension outside the font folders, as
|
||||
/// Creative Cloud loads Adobe Fonts, is listed by its file even though DirectWrite's collection
|
||||
/// doesn't hold it (#1258): fonts loaded for one process never are.
|
||||
#[test]
|
||||
fn fonts_only_gdi_has_loaded_are_listed_by_their_files() {
|
||||
use windows::Win32::Graphics::Gdi::{AddFontResourceExW, FR_PRIVATE, RemoveFontResourceExW};
|
||||
let dir = std::env::temp_dir().join(format!("vc-gdi-fonts-{}", std::process::id()));
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
let file = dir.join("29457");
|
||||
let source = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../assets/fonts/SourceSans3-Regular.ttf");
|
||||
let mut data = std::fs::read(source).unwrap();
|
||||
// Renamed (to a name as long) so no installed Source Sans 3 stands in for it.
|
||||
let utf16 = |s: &str| s.encode_utf16().flat_map(u16::to_be_bytes).collect::<Vec<u8>>();
|
||||
for (from, to) in [(utf16("Source Sans 3"), utf16("GdiOnly Sans3")), (b"Source Sans 3".to_vec(), b"GdiOnly Sans3".to_vec())] {
|
||||
let mut i = 0;
|
||||
while let Some(at) = data[i..].windows(from.len()).position(|w| w == from) {
|
||||
data[i + at..i + at + to.len()].copy_from_slice(&to);
|
||||
i += at + to.len();
|
||||
}
|
||||
}
|
||||
std::fs::write(&file, data).unwrap();
|
||||
let path = windows::core::HSTRING::from(file.as_os_str());
|
||||
assert_eq!(unsafe { AddFontResourceExW(&path, FR_PRIVATE, None) }, 1);
|
||||
let files = super::font_files();
|
||||
let _ = unsafe { RemoveFontResourceExW(&path, FR_PRIVATE.0, None) };
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
let wanted = file.to_string_lossy().to_lowercase();
|
||||
assert!(files.iter().any(|f| f.to_lowercase() == wanted), "{wanted} not in {} files", files.len());
|
||||
}
|
||||
}
|
||||
@@ -164,3 +164,8 @@ sync_github_name = false
|
||||
real_name = "Caio Pontes Magalhães"
|
||||
display_name = "Caio Pontes"
|
||||
sync_github_name = false
|
||||
|
||||
[people.xbirks]
|
||||
real_name = "Andrés Ortega Montoya"
|
||||
display_name = "Andrés Ortega Montoya"
|
||||
sync_github_name = false
|
||||
@@ -1,6 +1,6 @@
|
||||
# Parity with Adobe Illustrator
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-26 · **Change:** minor (View & navigation: New View… / Edit Views… done, score and hours unchanged; previously: Type core: a double-click on a threaded port breaks the thread, scores unchanged; previously:; Path operations: Pathfinder Options; previously:; Strokes, brushes: brush libraries (Window › Brush Libraries, four generated libraries, User Defined, Other Library…, Save Brushes; click and drag add library brushes in one undo step), the Brush Libraries placeholders leave the menu stubs; scores and hours unchanged; previously: Artboards: Delete Empty Artboards; previously: Repeat: a selected Grid Repeat shows handles: the one below the grid adds or removes rows, the one right of it columns, the one past its bottom-right corner both, and the sliders between the first two columns and rows set the horizontal and vertical spacing; each drag is one undo step and Escape cancels it (#2691); score and hours unchanged; previously:; UI: the Transform panel menu's Transform Object Only / Pattern Only / Both and Use Registration Point for Symbol act, scores unchanged; previously:; UI chrome: General › Corner Radius acts for the Rounded Rectangle tool, score unchanged at 80%, estimated; previously:; Transform Each opens on the values it was last confirmed with and has a Copy button instead of a Copy checkbox (#1732); scores and estimates unchanged; previously: Recolor Artwork › Assign: double-click a new color for the Color Picker, which keeps a CMYK mix as typed (part of #4028; Lab can't be typed yet); scores and estimates unchanged; previously: Path operations: Shape Builder's edge-source index is a grid, diagonal hatches no longer quadratic, scores unchanged; previously:; imported function-based PDF shadings keep their colours (#3621); docs catch-up: superseded Raster effects and Live vector effects rows removed, Relative rounding no longer missing (#3091), Hard/Soft Mix and Trap noted done in the 2026-10-05 table; scores and hours unchanged; previously: Type advanced: ruby is kept by Create Outlines and in EPS, EMF/WMF and legacy `.ai` exports, scores unchanged; previously: Path operations: Shape Builder pieces on dense hatches no longer leave specks where the sweep cut a line's two passes apart, scores unchanged; previously: Select › Start Global Edit: objects of the same shape (Appearance, Size, artboard options) edited together in proportion as one undo step, #3521, score and hours unchanged; previously:; symbol libraries: Window › Symbol Libraries and the Symbols panel's Symbol Libraries Menu open library panels of a generated Basic Shapes library, User Defined libraries and any document's symbols (Other Library…); a symbol clicked is added to the document's Symbols, one dragged onto the canvas is placed too, and Save Symbols writes a `.vectorcraft` library; scores and hours unchanged; previously:; Type core: threading ports on every selected area type and type on a path, the in port threading backwards, #2572; scores unchanged; G1: Distance Guides (Smart Guides › Invoke Distance Guides): with something selected and the Selection tool, Alt/Option over another object shows the horizontal and vertical distances between them, and over an empty part of an artboard the selection's distances from its four edges, labelled in the General unit; scores and hours unchanged; previously:; Pathfinder › Trap: the Pathfinder panel's Trap… and Effect › Pathfinder › Trap… add overprinting traps of the lighter colour where solid colours meet; Live vector effects measured count 49/50, score unchanged, hours 6–10 → 4–8; Artboard Options: Show Video Safe Areas (`showVideoSafeAreas`) outlines the action-safe and title-safe areas 3.5% and 5% in from each edge (EBU R 95) on the canvas only, and Video Ruler Pixel Aspect Ratio (`videoRulerPixelAspectRatio`, 0.1–10, default 1) sets how wide a video pixel is, per artboard, in one undo step and in the native format; View › Rulers › Show Video Rulers (`view.videoRulers`) counts the active artboard in those pixels from its top-left corner (#2849); scores and estimates unchanged; Drawing tools: a double-click on the Line Segment, Arc, Rectangular Grid or Polar Grid tool opens its Tool Options, whose OK sets the next drag's and click's options (#2691, in part); score and hours unchanged; Libraries panel: items show as icons or in a list, toggled beside the library picker; scores unchanged; Pencil: Shift held at the press draws a straight line at 45° steps from the Constrain Angle, and one started on an end of a selected open path continues it (part of #3799); status-bar pointer readout follow-up; scores and hours unchanged; font menu: Font Technology › Variable lists only variable font families, G4; previously:; Simplify of part of a path: with anchors or segments of a path direct-selected, Object › Path › Simplify (slider, Auto-Simplify and dialog) refits only each run of selectedLine truncated
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-26 · **Change:** minor (Type: on Windows, fonts that GDI lists but DirectWrite's system collection leaves out, as Creative Cloud's Adobe Fonts on some machines, are listed by their files too (#1258), scores unchanged; previously:; View & navigation: New View… / Edit Views… done, score and hours unchanged; previously: Type core: a double-click on a threaded port breaks the thread, scores unchanged; previously:; Path operations: Pathfinder Options; previously:; Strokes, brushes: brush libraries (Window › Brush Libraries, four generated libraries, User Defined, Other Library…, Save Brushes; click and drag add library brushes in one undo step), the Brush Libraries placeholders leave the menu stubs; scores and hours unchanged; previously: Artboards: Delete Empty Artboards; previously: Repeat: a selected Grid Repeat shows handles: the one below the grid adds or removes rows, the one right of it columns, the one past its bottom-right corner both, and the sliders between the first two columns and rows set the horizontal and vertical spacing; each drag is one undo step and Escape cancels it (#2691); score and hours unchanged; previously:; UI: the Transform panel menu's Transform Object Only / Pattern Only / Both and Use Registration Point for Symbol act, scores unchanged; previously:; UI chrome: General › Corner Radius acts for the Rounded Rectangle tool, score unchanged at 80%, estimated; previously:; Transform Each opens on the values it was last confirmed with and has a Copy button instead of a Copy checkbox (#1732); scores and estimates unchanged; previously: Recolor Artwork › Assign: double-click a new color for the Color Picker, which keeps a CMYK mix as typed (part of #4028; Lab can't be typed yet); scores and estimates unchanged; previously: Path operations: Shape Builder's edge-source index is a grid, diagonal hatches no longer quadratic, scores unchanged; previously:; imported function-based PDF shadings keep their colours (#3621); docs catch-up: superseded Raster effects and Live vector effects rows removed, Relative rounding no longer missing (#3091), Hard/Soft Mix and Trap noted done in the 2026-10-05 table; scores and hours unchanged; previously: Type advanced: ruby is kept by Create Outlines and in EPS, EMF/WMF and legacy `.ai` exports, scores unchanged; previously: Path operations: Shape Builder pieces on dense hatches no longer leave specks where the sweep cut a line's two passes apart, scores unchanged; previously: Select › Start Global Edit: objects of the same shape (Appearance, Size, artboard options) edited together in proportion as one undo step, #3521, score and hours unchanged; previously:; symbol libraries: Window › Symbol Libraries and the Symbols panel's Symbol Libraries Menu open library panels of a generated Basic Shapes library, User Defined libraries and any document's symbols (Other Library…); a symbol clicked is added to the document's Symbols, one dragged onto the canvas is placed too, and Save Symbols writes a `.vectorcraft` library; scores and hours unchanged; previously:; Type core: threading ports on every selected area type and type on a path, the in port threading backwards, #2572; scores unchanged; G1: Distance Guides (Smart Guides › Invoke Distance Guides): with something selected and the Selection tool, Alt/Option over another object shows the horizontal and vertical distances between them, and over an empty part of an artboard the selection's distances from its four edges, labelled in the General unit; scores and hours unchanged; previously:; Pathfinder › Trap: the Pathfinder panel's Trap… and Effect › Pathfinder › Trap… add overprinting traps of the lighter colour where solid colours meet; Live vector effects measured count 49/50, score unchanged, hours 6–10 → 4–8; Artboard Options: Show Video Safe Areas (`showVideoSafeAreas`) outlines the action-safe and title-safe areas 3.5% and 5% in from each edge (EBU R 95) on the canvas only, and Video Ruler Pixel Aspect Ratio (`videoRulerPixelAspectRatio`, 0.1–10, default 1) sets how wide a video pixel is, per artboard, in one undo step and in the native format; View › Rulers › Show Video Rulers (`view.videoRulers`) counts the active artboard in those pixels from its top-left corner (#2849); scores and estimates unchanged; Drawing tools: a double-click on the Line Segment, Arc, Rectangular Grid or Polar Grid tool opens its Tool Options, whose OK sets the next drag's and click's options (#2691, in part); score and hours unchanged; Libraries panel: items show as icons or in a list, toggled beside the library picker; scores unchanged; Pencil: Shift held at the press draws a straight line at 45° steps from the Constrain Angle, and one started on an end of a selected open path continues it (part of #3799); status-bar pointer readout follow-up; scores and hours unchanged; font menu: Font Technology › Variable lists only variable fLine truncated
|
||||
|
||||
## Feature submission evidence
|
||||
|
||||
@@ -19,6 +19,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-26 | minor | Type: on Windows, the font families GDI lists that DirectWrite's system font collection doesn't name are asked for one by one (a GDI font selected into a device context gives its DirectWrite face, and that face its files), so fonts Creative Cloud loads that only GDI has, read from their extensionless files in place, are in the font menus (#1258; `system_fonts::tests::fonts_only_gdi_has_loaded_are_listed_by_their_files`); the faces still listed keep their files between looks, so the look every two seconds stays about as fast. Scores and hours unchanged. |
|
||||
| 2026-10-22 | minor | Reconcile upstream documentation after review F-3; preserve every dated revision and the original scaleArt runtime evidence without repeating completed jobs. |
|
||||
| 2026-10-22 | minor | Reconcile upstream documentation after review F-2; preserve every dated revision and the original scaleArt runtime evidence without repeating completed jobs. |
|
||||
| 2026-10-22 | minor | Reconcile subsequent upstream progress updates without changing the runtime or repeating completed evidence; retain every dated upstream and feature revision. |
|
||||
@@ -892,7 +893,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
Change Case, Smart Punctuation, Find and Replace, Convert To Area Type, Convert To Point Type, Type on a Path Options, the Type on a Path effects and Fill with Placeholder Text record no undo step when they change nothing.
|
||||
The commands that take `keepModel` (fills and strokes, Appearance rows, Live Paint, Shape Builder fills, gradient stops and freeform points, gradient mesh points, type colors, the Symbol Stainer and the swatch commands) refuse a `keepModel` other than true, false or null, such as "true". Toggle Fill/Stroke Focus (`fill`), Invert, Complement, Apply Last Color and Apply Last Gradient (`stroke`), `paint.setFill` and `paint.setStroke` (`focus`, `none`), and `appearance.setItem`, `livePaint.fill`, `livePaint.strokeEdge`, a `shapeBuilder.merge` `fill`, `swatch.new` and `swatch.edit`'s `paint` (`none`) refuse such a value too. Each leaves the document, its undo history and the defaults for new art as they were.
|
||||
The shape tools' commands (Rectangle, Polygon, Star, Flare, Spiral, Arc, Rectangular Grid and Polar Grid), `path.create` (with `anchors` or `d`), the type commands (new type, type in a path, character formats, the byte range a text command takes, Touch Type, font size steps, `text.getRange`, Optical Margin Alignment, System Layout, Fractional Widths, Ruby and Area Type Options), the symbol commands (Place, Delete, the Symbol Sprayer and the symbolism tools), the swatch commands, the Appearance panel's commands, the gradient and freeform gradient commands, Shape Builder, Live Paint and Image Trace refuse an option other than true, false or null and a number given as text, such as "true" or "40", and leave the document and its undo history as they were.
|
||||
- **Fonts:** a font is found by any of its names (family and style in every language of its name table, legacy family/style pairs, PostScript name), so documents from other apps open with the font they name; Find Font and `text.fonts` say for each font whether it was found exactly, by another name, substituted or missing, and how many glyphs are missing. PDF and `.ai` import brings Japanese text back as live type: CID fonts without a ToUnicode map read through the standard CMaps, vertical columns (WMode 1) as vertical type, letter spacing as tracking; a glyph is live type only when the installed font (in the closest style of its family) draws the same glyph, and text in a font that isn't installed comes in as live type shown in the fallback font until the font is installed (exports that draw it — PDF, EPS, EMF/WMF, raster, SVG outlines or embedded fonts — warn that they wrote the fallback font, and Print and Print Preview warn about the type that prints in it; `textAs: outlines` keeps the PDF's embedded glyphs). Two installed versions of one family and style (a font library keeping an old file beside a new one) both load, the first staying the one the family and style resolve to; PDF and `.ai` import tries each version when the glyphs differ, and type set in a version other than that one names it (`CharStyle::font_version`), which layout, the substituted-glyph highlight, Find Font, Package and Document Info follow. Fonts outside the font folders are listed too: those font services such as Adobe Fonts load on Windows, through DirectWrite, and those apps and font managers register with CoreText on macOS (#579). When a document opens with fonts that aren't available, fonts used only in symbols included, a Missing Fonts dialog lists them after the linked-file questions, with Find Fonts (Type › Find Font on them) and Close. Its Find in Folder… (in Find Font too) searches a folder on several threads, reads only what the font scan reads of font files and skips app packages, the Program Files and ProgramData folders, the system's folders and the app data folders in a home folder; Add Fonts copies the font files the user chooses, suitcase fonts with their resource fork, into VectorCraft's own Fonts folder, which the desktop app and `vectorcraft-cli` read (`text.missingFonts`, `text.findFontFiles`, `text.addFontFiles`). The font scan on Linux also reads the folders fontconfig's configuration lists, such as TeX fonts under `/usr/share/texmf/fonts` (#1548, fixes #1529; not verified on Linux).
|
||||
- **Fonts:** a font is found by any of its names (family and style in every language of its name table, legacy family/style pairs, PostScript name), so documents from other apps open with the font they name; Find Font and `text.fonts` say for each font whether it was found exactly, by another name, substituted or missing, and how many glyphs are missing. PDF and `.ai` import brings Japanese text back as live type: CID fonts without a ToUnicode map read through the standard CMaps, vertical columns (WMode 1) as vertical type, letter spacing as tracking; a glyph is live type only when the installed font (in the closest style of its family) draws the same glyph, and text in a font that isn't installed comes in as live type shown in the fallback font until the font is installed (exports that draw it — PDF, EPS, EMF/WMF, raster, SVG outlines or embedded fonts — warn that they wrote the fallback font, and Print and Print Preview warn about the type that prints in it; `textAs: outlines` keeps the PDF's embedded glyphs). Two installed versions of one family and style (a font library keeping an old file beside a new one) both load, the first staying the one the family and style resolve to; PDF and `.ai` import tries each version when the glyphs differ, and type set in a version other than that one names it (`CharStyle::font_version`), which layout, the substituted-glyph highlight, Find Font, Package and Document Info follow. Fonts outside the font folders are listed too: those font services such as Adobe Fonts load on Windows, through DirectWrite and, for those only GDI lists, through GDI (#1258), and those apps and font managers register with CoreText on macOS (#579). When a document opens with fonts that aren't available, fonts used only in symbols included, a Missing Fonts dialog lists them after the linked-file questions, with Find Fonts (Type › Find Font on them) and Close. Its Find in Folder… (in Find Font too) searches a folder on several threads, reads only what the font scan reads of font files and skips app packages, the Program Files and ProgramData folders, the system's folders and the app data folders in a home folder; Add Fonts copies the font files the user chooses, suitcase fonts with their resource fork, into VectorCraft's own Fonts folder, which the desktop app and `vectorcraft-cli` read (`text.missingFonts`, `text.findFontFiles`, `text.addFontFiles`). The font scan on Linux also reads the folders fontconfig's configuration lists, such as TeX fonts under `/usr/share/texmf/fonts` (#1548, fixes #1529; not verified on Linux).
|
||||
A variable font's type gets one slider and field per variation axis under the Character panel's Variable Font button, each named as the font names the axis (Weight, Width), so the type can be set between or past its named instances: the settings stay with the characters (`CharStyle::font_axes`, `text.setFormat {fontAxes}` and `text.setRangeStyle {fontAxes}`, clamped to each axis's range; `text.fontList {family, style}` lists the axes), and layout, outlines, the substituted-glyph highlight and PDF and SVG export (`font-variation-settings`, embedded fonts) use the font instanced at them. Another font or style clears them; legacy `.ai` export writes the style and warns that they are left out.
|
||||
The font menu's Font Technology › Variable (under the kind filter, as [Find, apply, and adjust variable fonts](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/find-apply-and-adjust-variable-fonts.html) places Variable in the classification filter's Font Technology section) lists only the families with variation axes, a family with a variable file beside static ones included, and works together with the script, kind, ★ and search filters; it stays set from one opening to the next. Measured by `font_menu::tests::the_variable_filter_lists_only_variable_families`, `font_menu::tests::the_variable_filter_is_named_as_fonts_are`, `tests_axes::a_family_with_variation_axes_is_variable` and `tests_sysfonts::a_family_with_a_variable_file_beside_static_ones_is_variable`.
|
||||
The font database looks up a name that is neither a loaded nor an installed family among the other names of the loaded and installed fonts once for each style it is asked in, and keeps the answer until fonts are added or rescanned. Laying out a story of 1,000 paragraphs set in a font that is not installed, with 400 more fonts loaded, takes a median of 56 to 71 ms instead of 409 to 507 ms on Windows 11 (`CRAFT_FONTS_DIR=<craft-fonts checkout> cargo test --release -p vectorcraft-text --lib missing_font_story_layout_timing -- --ignored --nocapture`).
|
||||
|
||||
Reference in new issue
Block a user