feat: Improve CMap handling with binary CMap support, inline ToUnicode, and fallback decoding
- Add pdf.js binary CMap (bcmap) parser for Japan1/GB1/CNS1 CID fonts - Support inline ToUnicode streams (not just object references) - Add CMapDecisionCache for heuristic primary vs remapped CMap selection - Build fallback CMaps from embedded font data and CIDSystemInfo - Handle simple fonts without ToUnicode via embedded font cmap - Add Symbol/Wingdings/ZapfDingbats font decoding fallback - Support usecmap chaining in both text and binary CMap formats - Scan XObject Forms for text operators in detector - Change default detection strategy from EarlyExit to Sample(8) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
66c88a4fc9
commit
65e305d544
@@ -57,7 +57,7 @@ fn make_text_item_with_font(
|
||||
#[test]
|
||||
fn test_detection_config_default() {
|
||||
let config = DetectionConfig::default();
|
||||
assert!(matches!(config.strategy, ScanStrategy::EarlyExit));
|
||||
assert!(matches!(config.strategy, ScanStrategy::Sample(8)));
|
||||
assert_eq!(config.min_text_ops_per_page, 3);
|
||||
assert!((config.text_page_ratio_threshold - 0.6).abs() < 0.001);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user