We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
now that we require Go>=1.16, we can use //go:embed directives.
//go:embed
The text was updated successfully, but these errors were encountered:
Do you mean to replace embedded.go with //go:embed ?
embedded.go
I would like to try this new directive, i can try to work on this issue.
Currently embeddedMapList has only cp1250 and cp1252 but it's possible to embed all map files of font directory.
embeddedMapList
cp1250
cp1252
font
Something like that ?
//go:embed font/*.map var embeddedFontMap embed.FS func (f *Fpdf) UnicodeTranslatorFromDescriptor(cpStr string) (rep func(string) string) { if f.err == nil { if len(cpStr) == 0 { cpStr = "cp1252" } emb, err := embeddedFontMap.Open("font/" + cpStr + ".map") if err == nil { rep, f.err = UnicodeTranslator(emb) } else { rep, f.err = UnicodeTranslatorFromFile(filepath.Join(f.fontpath, cpStr) + ".map") } } else { rep = doNothing } return }
Sorry, something went wrong.
yep, some like that.
when I filed that issue I hadn't surveyed the whole list of embedded files that fpdf used.
fpdf
78a674e
No branches or pull requests
now that we require Go>=1.16, we can use
//go:embed
directives.The text was updated successfully, but these errors were encountered: