FontStyleCSS looks for "tag" name properties in cssAgg properties, and applies those to style if found, and returns true -- false if no such tag found
(fs *styles.FontRender, tag string, cssAgg map[string]any, unit *units.Context, ctxt colors.Context)
| 86 | // FontStyleCSS looks for "tag" name properties in cssAgg properties, and applies those to |
| 87 | // style if found, and returns true -- false if no such tag found |
| 88 | func FontStyleCSS(fs *styles.FontRender, tag string, cssAgg map[string]any, unit *units.Context, ctxt colors.Context) bool { |
| 89 | if cssAgg == nil { |
| 90 | return false |
| 91 | } |
| 92 | tp, ok := cssAgg[tag] |
| 93 | if !ok { |
| 94 | return false |
| 95 | } |
| 96 | pmap, ok := tp.(map[string]any) // must be a properties map |
| 97 | if ok { |
| 98 | fs.SetStyleProperties(nil, pmap, ctxt) |
| 99 | OpenFont(fs, unit) |
| 100 | return true |
| 101 | } |
| 102 | return false |
| 103 | } |
no test coverage detected