Skip to content

Improve documentation for AddUTF8Font #18

@rickb777

Description

@rickb777

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions