Skip to content
New issue

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

Improve documentation for AddUTF8Font #18

Open
rickb777 opened this issue Jun 17, 2021 · 0 comments
Open

Improve documentation for AddUTF8Font #18

rickb777 opened this issue Jun 17, 2021 · 0 comments

Comments

@rickb777
Copy link

AddUTF8Font appears to have the documentation copied from AddFont. I suggest the following replacement might be an improvement.

// AddUTF8Font imports a TrueType font with utf-8 symbols and makes it available.
// The TTF font file must be present in the font directory, or a subdirectory. If it is 
// not found, an error is set.
//
// familyStr specifies the font family. The name can be chosen arbitrarily. If it
// is a standard family name, it will override the corresponding font. This
// string is used to subsequently set the font with the SetFont method.
//
// styleStr specifies the font style. Acceptable values are (case insensitive) the
// empty string for regular style, "B" for bold, "I" for italic, or "BI" or
// "IB" for bold and italic combined.
//
// fileStr specifies the name with ".ttf" extension of the font file to be added.
// The file will be loaded from the font directory specified in the call to New()
// or SetFontLocation(). fileStr can include a relative path, meaning the font can
// be loaded from a subdirectory of the font directory.

Also, the other Add..Font methods mention family instead of familyStr, style instead of styleStr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant