mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 12:32:52 +00:00
M1: the Type 3 Unicode fallbacks are documented on Glyph::as_unicode and Type3Glyph::as_unicode (create.text-extraction)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
This commit is contained in:
1 parent
70b5755a7c
commit
b0eb080434
1 file changed
+9
-1
+9
-1
@@ -94,6 +94,12 @@ impl Glyph<'_> {
|
||||
///
|
||||
/// **For Type3 Fonts:**
|
||||
/// 1. `ToUnicode` cmap
|
||||
/// 2. PdfCraft patch: the `/Encoding` glyph name → Unicode (an Annex D.2 alias code reads as
|
||||
/// the ordinary character)
|
||||
/// 3. PdfCraft patch: a printable ASCII code (32–126) as itself
|
||||
/// 4. PdfCraft patch (100): above 126, a name that only numbers its glyph (`C174`) as the
|
||||
/// code's Latin-1 character, when the number is that code and every numbered name in the
|
||||
/// font names its own code
|
||||
///
|
||||
/// Returns `None` if the Unicode value could not be determined.
|
||||
///
|
||||
@@ -146,7 +152,9 @@ impl OutlineGlyph {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the Unicode code point for this glyph, if available.
|
||||
/// Returns the Unicode code point for this glyph, if available: the `ToUnicode` cmap, then
|
||||
/// the `/Encoding` glyph name, a printable ASCII code, and a numbered glyph name at its own
|
||||
/// code (PdfCraft patches).
|
||||
///
|
||||
/// See [`Glyph::as_unicode`] for details on the fallback chain used.
|
||||
pub fn as_unicode(&self) -> Option<BfString> {
|
||||
|
||||
Reference in new issue
Block a user