mirror of
				https://github.com/johnwhitington/cpdf-source.git
				synced 2025-06-05 22:09:39 +02:00 
			
		
		
		
	Fix /Width non-subset entries
This commit is contained in:
		| @@ -2,8 +2,6 @@ | |||||||
| open Pdfutil | open Pdfutil | ||||||
| open Pdfio | open Pdfio | ||||||
|  |  | ||||||
| (* FIXME revisit widths for mono font - the new code returning the notdef width is making the notdef width turn up in /Widths, where missing entries should be 0! *) |  | ||||||
|  |  | ||||||
| let dbg = | let dbg = | ||||||
|   (* Pdfe.logger := (fun s -> print_string s; flush stdout) *) |   (* Pdfe.logger := (fun s -> print_string s; flush stdout) *) | ||||||
|   ref false |   ref false | ||||||
| @@ -346,7 +344,7 @@ let calculate_widths unitsPerEm encoding firstchar lastchar subset cmapdata hmtx | |||||||
|        if !dbg then Printf.printf "code %i --> " code; |        if !dbg then Printf.printf "code %i --> " code; | ||||||
|        let code = unicode_codepoint_of_pdfcode encoding_table glyphlist_table code in |        let code = unicode_codepoint_of_pdfcode encoding_table glyphlist_table code in | ||||||
|        if !dbg then Printf.printf "unicode %i --> " code; |        if !dbg then Printf.printf "unicode %i --> " code; | ||||||
|        if not (mem code subset) then hmtxdata.(0) else |        if not (mem code subset) then 0 else | ||||||
|        try |        try | ||||||
|          let glyphnum = Hashtbl.find cmapdata code in |          let glyphnum = Hashtbl.find cmapdata code in | ||||||
|            if !dbg then Printf.printf "glyph number %i --> " glyphnum; |            if !dbg then Printf.printf "glyph number %i --> " glyphnum; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user