Skip to content

Font name acquisition #1

@JackSinner

Description

@JackSinner
dirs, _ := fontconfig.DefaultFontDirs()
    for _, dir := range dirs {
        config := fontconfig.NewConfig()

        ff, err := config.ScanFontDirectories(dir)
        if err != nil {
            fmt.Println(err.Error())
            os.Exit(1)
        }
        for _, pattern := range ff {
            fmt.Println(pattern.GetAt(fontconfig.FULLNAME, 1))
        }
    }

Hello, I failed to get the second full name with the above code.

image

My local computer contains a second full name font. Is there any problem with my use?

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