mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-10 06:31:19 +00:00
Legacy type in a composite font such as HeiseiMin-W3-83pv-RKSJ-H was decoded one byte to a character, so Japanese, Chinese and Korean type opened as unrelated single-byte characters, and the font name kept the CMap. Tf now finds a predefined CMap at the end of the font name, unless a TZ gives the font encoding pairs, and the font is the name without it. Strings in that font are read by the CMap's code space, mapped to CIDs with the predefined CMaps craft-pdf carries, then to Unicode by the character collection's CID-to-Unicode CMap. Codes the CMap doesn't map are dropped. A -V CMap is read with its -H form's codes. Codes in the Unicode CMaps (UCS2, UTF8, UTF16, UTF32) are read as Unicode; those helpers follow mockydevs' #6067. A 0x0D byte ends a paragraph and a 0x09 byte is a tab in these fonts too. The predefined CMaps craft-pdf doesn't carry (RKSJ, 78-RKSJ, 78ms-RKSJ, 78-EUC, 78, Add, Ext, NWP, GB, CNS1, KSC, B5 and the Hong Kong B5 sets other than HKscs-B5) are read with the nearest carried CMap, which can give a different character for some codes. GBT, GBT-EUC, GBTpc-EUC, CNS2 and KSC-Johab type still decodes byte by byte, with the CMap removed from the font name. Docs: docs/file-format-parity.md.
44 lines
1.7 KiB
TOML
44 lines
1.7 KiB
TOML
[package]
|
|
name = "vectorcraft-eps"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "VectorCraft Encapsulated PostScript: a hand-written EPS writer (PostScript Level 2 and 3) with TIFF previews"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
vectorcraft-geom = { workspace = true }
|
|
vectorcraft-color = { workspace = true }
|
|
vectorcraft-doc = { workspace = true }
|
|
vectorcraft-effects = { workspace = true }
|
|
# The editing data for other apps writes clipped art cut to its clipping path.
|
|
vectorcraft-pathops = { workspace = true }
|
|
vectorcraft-brush = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
# Windows metafile previews, opened when a file's PostScript can't be read.
|
|
vectorcraft-metafile = { workspace = true }
|
|
# Non-native art in Illustrator editing data (a placed PDF's content, kept as a PDF).
|
|
vectorcraft-pdf = { workspace = true }
|
|
# The predefined CMaps that strings of legacy type in CJK fonts are decoded by.
|
|
craft-pdf = { workspace = true }
|
|
# The TIFF writer (previews) and PackBits, shared with raster export.
|
|
vectorcraft-render = { workspace = true }
|
|
kurbo = { workspace = true }
|
|
image = { workspace = true }
|
|
flate2 = { workspace = true }
|
|
ruzstd = { workspace = true }
|
|
# Images read through `CCITTFaxDecode`.
|
|
hayro-ccitt = { workspace = true }
|
|
# Live effects' params, as the art styles that name them give them.
|
|
serde_json = { workspace = true }
|
|
# Substring search for PostScript `search`.
|
|
memchr = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
vectorcraft-testkit = { workspace = true }
|
|
vectorcraft-text = { workspace = true, features = ["test-fonts"] }
|
|
# Tests: a Group 4 encoder and the T.4 run codes, to write CCITT test images.
|
|
fax = "0.2"
|