Commit Graph
637 Commits
Author SHA1 Message Date
BFlat 8e55ffdddf Merge pull request #7229 from dotCooCoo/feat/kinsoku-sets
Type: Kinsoku Shori sets can be created, edited and chosen per paragraph
2026-11-19 14:54:38 +07:00
dotCooCoo b6f310c421 Merge main into feat/docinfo-font-details 2026-11-18 13:14:52 -08:00
dotCooCoo fe17b6ebee Merge main into feat/kinsoku-sets 2026-11-18 10:26:50 -08:00
BFlat ca812ef78e Merge pull request #8408 from dotCooCoo/feat/type-missing-font-edit-confirm
Type: editing type set in a missing font asks to confirm first
2026-11-19 00:42:06 +07:00
BFlat 16e7216c16 Merge pull request #8441 from ruchirguitar/feat/4934-retype
Type › Retype, phase 1: outlined text that matches an available font becomes live type (#4934)
2026-11-19 00:38:40 +07:00
dotCooCoo 2db6ae68df Merge main into feat/docinfo-font-details 2026-11-18 08:16:53 -08:00
dotCooCoo 83bb31c9e2 Merge main into feat/type-missing-font-edit-confirm 2026-11-18 07:33:32 -08:00
dotCooCoo b2c14dbf87 Merge main into feat/kinsoku-sets 2026-11-18 07:26:37 -08:00
ruchirguitar 4c44f3c66c Merge remote-tracking branch 'upstream/main' into feat/4934-retype
# Conflicts:
#	crates/text/src/fontdb/lookup.rs
2026-11-18 20:38:09 +05:30
bflatastic 11b6ae8203 text: pin craft-font-catalog to craft-libs main and restore the shared outline call 2026-11-18 22:02:41 +07:00
Dylan M. Taylor c758d60942 Merge pull request #7904 from storytold/codex/shared-ligature-carets-caller
Use shared ligature caret mapping
2026-11-18 09:53:58 -05:00
bflatastic 585c0aaa70 fmt: reflow the fontdb lookup imports after #7877 2026-11-18 21:52:24 +07:00
Dylan M. Taylor 4c57169a87 Merge remote-tracking branch 'origin/main' into pr-7904
# Conflicts:
#	Cargo.lock
#	crates/text/Cargo.toml
#	crates/text/src/fontdb/lookup.rs
2026-11-18 09:50:09 -05:00
Dylan M. Taylor 64458d0a5a Merge remote-tracking branch 'origin/main' into pr-7904 2026-11-18 09:21:45 -05:00
Dylan M. Taylor 1b150df493 Merge remote-tracking branch 'origin/main' into pr-7877 2026-11-18 09:21:41 -05:00
ruchirguitar 4fe27f830c M7/G4: retype bounds readings tried and glyphs laid out (#4934)
Readings of a shape are capped by those tried, not those kept, so a shape
whose every reading fails stops at the cap. The layout check grows a
window from each line start, doubling while the type draws the outlines,
and starts the next line at a mismatch, so a line split at every glyph
costs about twice its glyphs, not half their square; a glyph budget
leaves anything past it as outlines. A tracked line of 450 glyphs: 259 ms.
2026-11-18 19:39:40 +05:30
ruchirguitar 1cffa0b862 M7/G4: retype review: tracked letters, outline check cost, poses (#4934)
The lone-glyph rule looks at lines as the outlines lie, before the layout
check splits them, so tracked one-contour letters (L, I, T, H, E) become
type. A shape keeps every glyph and pose it fits exactly, upright first
(an L, and a turned L half round; an I upright or upside down), and the
line around it chooses; a one-glyph line may turn to another candidate
to take the next glyph.

The whole-outline check flattens the shape once per shape, samples every
corner and points twice the tolerance apart, and asks a flat uniform grid
of segments. With Microsoft YaHei loaded: 300 CJK outlines in 350 ms
(1.9 s before), one line in 25 ms. FontDb::outline reuses
outline_uncached, and the compositing test covers knockout_shape.
2026-11-18 18:58:52 +05:30
ruchirguitar c1613f2bf5 M7/G4: retype checks points along every edge; keys charged once (#4934)
The whole-outline check tests points along every edge, so outlines with
the same corners joined another way do not match; past a work limit it
rejects. Face keys another Retype kept meanwhile are reused and charged
once. The fonts parameter test uses outlines that would match. The parity
note states the search limits.
2026-11-18 15:25:41 +05:30
ruchirguitar 06e8ce62b9 M7/G4: retype matching reads contours as drawn, checks whole outlines (#4934)
Contours are read from a starting corner that does not depend on where
the path starts (every tied corner tried), with straight edges split in
two, degenerate curves and empty segments read as one line. A sampled
fit only shortlists a glyph: its whole outline, turned onto the shape,
must lie on it. Face keys are compact hashes, kept per process within a
budget; kept keys stay when new ones do not fit, and go when fonts are
added or rescanned.

A compound path with a locked or hidden part stays whole. A group with
an Attributes note, or any other extra, keeps its type inside. Faces are
counted once against the cap, and no font is read when every shape stays
an outline.
2026-11-18 15:07:47 +05:30
ruchirguitar 783437f775 M7/G4: retype review: hidden art, compositing, half turns, cost (#4934)
Hidden and locked shapes stay outlines and end the line. Isolated and
knockout groups keep their type inside. Type turned 180 degrees stays
one object (angles compared wrapped). A lone one-contour glyph beside
other shapes stays an outline unless it is the only shape selected.

The index samples only glyphs whose key (segments per contour) a selected
shape has, reads outlines past the shared outline cache, keeps each
face's keys once worked out, and loads no more faces than it takes. With
Microsoft YaHei (29,905 glyphs) loaded: 877 ms the first time, 23 ms
after.
2026-11-18 11:58:41 +05:30
dotCooCoo 4ed1839274 Merge main into feat/kinsoku-sets 2026-11-17 22:11:34 -08:00
dotCooCoo ec882bb4d2 Merge main into feat/docinfo-font-details 2026-11-17 21:39:52 -08:00
ruchirguitar c42cfd23b7 M7/G4: retype checks each line against its own layout (#4934)
Each retyped line is laid out and compared glyph by glyph with the
outlines; it splits where its type would draw another glyph or the same
glyph elsewhere (tracking, manual spacing, font substitutions), and a
glyph its type cannot draw stays an outline. Shapes with their own
opacity mask stay outlines. Shapes past the limits are reported as
truncated. Glyphs of plain-shape symbols (box drawing, blocks, geometric
shapes, private use) are not matched, so drawn rectangles stay art.
Type › Retype is in the Type menu.
2026-11-18 10:03:29 +05:30
dotCooCoo 116803ad28 Merge main into feat/kinsoku-sets 2026-11-17 20:02:14 -08:00
ruchirguitar 81d38d0d70 Merge remote-tracking branch 'upstream/main' into feat/4934-retype
# Conflicts:
#	docs/target-app-parity.md
2026-11-18 09:15:33 +05:30
BFlat 3d7acda832 Merge pull request #7134 from dotCooCoo/feat/web-korean-devanagari-fonts
Web: Korean and Hindi interface text draws with real glyphs
2026-11-18 10:30:59 +07:00
BFlat 61d3190469 Merge pull request #8181 from dotCooCoo/feat/area-type-first-baseline-em-box
Type: Area Type Options First Baseline offers Em Box Height
2026-11-18 10:22:23 +07:00
ruchirguitar 90b37ad269 M7/G4: retype keeps paint order, groups, transparency and font version (#4934)
An unmatched shape between glyphs ends the line, so the type after it is
still painted over it. Glyphs of different groups, paint or transparency
never share a line, and the new type takes the glyphs' own opacity and
blend mode. The type names the font version that matched. The glyph
budget holds inside a face too.
2026-11-18 03:02:33 +05:30
ruchirguitar 957712ca71 M7/G4: retype float checks without negated comparisons (#4934) 2026-11-18 02:48:38 +05:30
ruchirguitar 24a37f8ba3 M7/G4: Type › Retype, phase 1 (#4934)
type.retype turns selected outlined text back into live point text when
each glyph shape is exactly a glyph of a loaded font, a font the document
uses or a family named in fonts: the same up to uniform scale, rotation
and translation. Matched glyphs map back to characters through the cmap
and become point text in that font and size at the same baseline and
turn, one object per line, with the first glyph's fill and stroke, in one
undo step. Shapes that match no font stay and are reported.

Matching (vectorcraft_text::retype) samples each contour at equal steps of
arc length and fits a similarity transform; it is bounded (faces, glyphs,
path elements, contours) and panic-free. Near matches, the ranked font
list, installed fonts not yet loaded and images are phase 2.
2026-11-18 02:20:06 +05:30
BFlat e1b12a5640 Merge pull request #8060 from dotCooCoo/feat/hyphenation-languages
Type: text hyphenates in Bulgarian, Turkish and Russian, and in German, Polish, Portuguese and Italian with CRAFT_I18N_DIR
2026-11-18 03:22:00 +07:00
BFlat 5088d9c6ec Merge pull request #8272 from dotCooCoo/feat/emf-font-width-scale
Metafile import: a LOGFONT average character width becomes Horizontal Scale
2026-11-18 03:21:07 +07:00
dotCooCoo 2a3019fcfe Type: editing type set in a missing font asks to confirm first
A Type tool click, or a Selection or Direct Selection double-click, on
type whose story is drawn in a font that isn't available as named (a
missing family, or a style its family lacks) now opens a question that
names those fonts instead of starting to edit. OK starts editing with
the caret where the type was clicked; Cancel leaves the document, its
undo history and the selection as they were. Each new edit asks again;
a click within the type being edited, or in another frame of its story,
does not. The fonts the type names are not changed.

The check reads only the clicked story's runs. As in text.missingFonts,
it leaves out CSS generic families and names over 256 bytes; it also
skips inline graphics and empty runs. The CSS generic family list moves
to vectorcraft-text so both share it. The question is the
missingFontEdit dialog, answered through the Type tool's
missingFontEdit option.
2026-11-17 11:28:52 -08:00
Dylan M. Taylor 2dd120c0fe Use shared contextual run shaping (#7878) 2026-11-17 08:14:14 -05:00
HassanKhan 0c3e886675 Merge remote-tracking branch 'upstream/main' into fix-7821-harakat-tsume-arial 2026-11-17 11:34:26 +05:00
Dylan M. Taylor 6d91dde84c Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/text/src/fontdb/lookup.rs
2026-11-16 23:23:16 -05:00
dotCooCoo 96074220e2 Merge main into feat/docinfo-font-details 2026-11-16 19:57:25 -08:00
BFlat 968882fa8f Merge pull request #8227 from dotCooCoo/feat/font-menu-recently-added
Font menu: a Recently Added filter lists the families installed in the last 30 days, newest first
2026-11-17 09:49:44 +07:00
dotCooCoo d1b588279f Text: a variable font's Windows cell height takes its MVAR changes
FontFace::win_cell_height adds the MVAR `hcla` and `hcld` deltas to
usWinAscent and usWinDescent at the face's location, so EMF and WMF
type with a positive font height is sized against the instance it is
drawn in. The variable test font gains the two records, and a test
checks that Bold's cell is 200 units taller than Regular's.

The comments and docs/mcp.md also say that characters the mapped face
has no glyph for are drawn from other faces at the same size and
Horizontal Scale.
2026-11-16 17:00:27 -08:00
dotCooCoo fb927525f6 Metafile import: a LOGFONT average character width becomes Horizontal Scale
Follows #7608. EMF and WMF type ignored the font's average character
width, and a positive font height was read as a fixed 0.85 of the cell.
Both changes are to how the importer reads a LOGFONT's size fields.

- When the face gives an average width (OS/2 xAvgCharWidth), a font's
  average character width becomes Horizontal Scale: the face's average
  width at the type size is stretched or narrowed to the font's width,
  also when the size is held at its 5000 pt limit. A negative width is
  read as its absolute value, and the width is ignored when the height
  is 0.
- A positive height is the character cell. The em is the cell times
  unitsPerEm divided by the face's usWinAscent plus usWinDescent (its
  ascent plus descent when it has no OS/2 table). Type with a positive
  height in existing files changes size.
- A font the system lacks is measured in the face VectorCraft draws it
  in.
- FontFace gets win_cell_height and average_char_width.

LOGFONT: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfontw
MS-EMF 2.2.13 LogFont: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-emf/1cd7cb7a-1a7c-48d2-b4a4-c218f9d12100
2026-11-16 16:28:21 -08:00
dotCooCoo dd05a39106 Merge main into feat/type-on-path-desired-spacing 2026-11-16 10:46:53 -08:00
dotCooCoo 4fdeeb0223 Font menu: a Recently Added filter lists the families installed in the last 30 days, newest first
The font menu's Recently Added chip, on its own row under Font Technology,
lists only the installed families with a font file created in the last 30
days, the newest at the top. It combines with the search, script, kind,
Variable, star and Document filters, lists the recently used families in
the same order without the Recent Fonts section, leaves Show Similar Fonts
to order only these families, steers the closed field's wheel, and is
shared by every font menu for the session.

The font scan keeps each file's creation time, and
FontDb::recently_added(now) dates a family by its newest file at or
before `now`, the 30th day included. Files without a creation time or
dated in the future do not count, and families added at the same instant
are in name order. The open menu lists a family no longer once its 30
days end.
2026-11-16 09:58:48 -08:00
dotCooCoo 27295b0530 Merge main into feat/area-type-first-baseline-em-box 2026-11-16 09:55:33 -08:00
dotCooCoo 39d776aa2b Merge main into feat/web-korean-devanagari-fonts 2026-11-16 09:54:01 -08:00
BFlat c19024b6cc Merge pull request #8120 from dotCooCoo/perf/glyphs-panel-cmap-once
Glyphs: read a face's character list once instead of on every frame
2026-11-16 23:53:24 +07:00
dotCooCoo 5c789eb818 Merge main into feat/area-type-first-baseline-em-box 2026-11-16 08:15:17 -08:00
dotCooCoo 24e528abcf Type: Area Type Options First Baseline offers Em Box Height
First Baseline gains Em Box Height (`text.areaOptions {firstBaseline:
"emBoxHeight"}`, and the Area Type Options dropdown). The top of the
first line's ideographic em box, the largest on a line of several sizes,
touches the top of the type area inside the inset, in each row/column
cell and in vertical type. It is the em box that Top-to-Top leading
uses. Min is the least distance, as with the other kinds.

Native files save it as `emBoxHeight`. The .ai reader reads editing-data
kind 5 as Em Box Height and the writer writes it back; Legacy (6) and
unknown kinds keep today's fallback.

The dropdown's Ascent and x Height labels, and Fixed in Gujarati, get
the catalog rows nine languages were missing, beside the new label in
every catalog.

Help page: https://helpx.adobe.com/illustrator/desktop/design-with-text/add-manage-text/add-margins-to-text-and-adjust-the-first-baseline.html
2026-11-16 07:40:47 -08:00
dotCooCoo 6a66f9ad94 Type: decomposed Cyrillic and capital words hyphenate as their composed spelling
A Russian or Bulgarian word written with a combining breve (`и` + U+0306
for `й`) failed the Cyrillic script check and stayed whole; the check now
reads the composed word, so it breaks at the same characters as `чайник`.
A stress mark, which composes with nothing, still keeps the word whole.

The all-capitals guard skipped a decomposed capital such as `O` + U+0308,
since a combining mark has no case, so `ÖĞRENCİ` spelled that way was
hyphenated in Turkish; the guard now counts only the letters.
2026-11-16 07:33:39 -08:00
dotCooCoo 9973247dfc Type: test that Show Similar Fonts puts a family without numbers first when asked about it
The test now lists that family last, so it passes only when the family
asked about is moved to the front and the others keep their order.
2026-11-16 06:00:19 -08:00
dotCooCoo 10edf89f36 Glyphs: read a face's character list once instead of on every frame
The Glyphs panel asked the face for its characters on every frame, and
each call read the whole cmap, sorted it and removed repeated
characters. A face now keeps the list the first time it is asked for
(FontFace::mapped_chars) and shares it; FontFace::chars returns a copy
of it, in the same order. The panel finds a Unicode subset's characters
by searching the sorted list, and Entire Font uses the face's shared
list of unencoded glyphs instead of copying it each frame. The cells the
panel shows do not change.

Measured in one release process, old read and shared list alternating,
median of 7 samples of 100 calls, wall-clock times from a single run:
- Source Sans 3 Regular, 1,614 characters: 0.0101 ms to 0.000004 ms
- a test font of 50,000 characters: 0.2347 ms to 0.000004 ms
The saving matters for fonts with large character maps, such as CJK
fonts.
2026-11-16 04:35:29 -08:00