mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-27 13:48:51 +08:00
keep going when FontFile2 encoding is empty
This commit is contained in:
parent
bc1e9ae7b5
commit
ae87dc79f3
@ -209,10 +209,10 @@ func (font *pdfFontSimple) addEncoding() error {
|
||||
if descriptor.fontFile2 != nil {
|
||||
common.Log.Debug("Using FontFile2")
|
||||
encoder, err := descriptor.fontFile2.MakeEncoder()
|
||||
if err != nil {
|
||||
return err
|
||||
if err == nil {
|
||||
font.SetEncoder(encoder)
|
||||
}
|
||||
font.SetEncoder(encoder)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ func (rec *TtfType) MakeEncoder() (textencoding.SimpleEncoder, error) {
|
||||
if len(encoding) == 0 {
|
||||
common.Log.Error("rec=%s", rec)
|
||||
common.Log.Error("Chars=[% 02x]", rec.Chars)
|
||||
return textencoding.SimpleEncoder{}, errors.New("no encoding")
|
||||
// return textencoding.SimpleEncoder{}, errors.New("no encoding")
|
||||
}
|
||||
return textencoding.NewCustomSimpleTextEncoder(encoding, nil)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user