(fontType pdfName, fontDescriptor pdfDict)
| 528 | } |
| 529 | |
| 530 | func (r *pdfReader) getBuiltinEncoding(fontType pdfName, fontDescriptor pdfDict) (encoding, error) { |
| 531 | sfnt, err := r.getFontProgram(fontDescriptor) |
| 532 | if err != nil { |
| 533 | return builtinEncoding{}, err |
| 534 | } else if sfnt == nil { |
| 535 | return standardEncoding{}, nil // standard font |
| 536 | } |
| 537 | bytes := 1 |
| 538 | if fontType == pdfName("CIDFontType0") || fontType == pdfName("CIDFontType2") { |
| 539 | bytes = 2 |
| 540 | } |
| 541 | return builtinEncoding{bytes, sfnt}, nil |
| 542 | } |
| 543 | |
| 544 | type charsetEntry struct { |
| 545 | name string |
no test coverage detected