mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
8979550127
commit
05579265b8
5 files changed
+178
-17
No files matched your search
@@ -360,11 +360,9 @@ func fontBindingNode(data []byte, id string) (*editorXML, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if fonts := root.child("Fonts"); fonts != nil {
|
||||
for _, node := range fonts.children {
|
||||
if node.matchesOFD("Font") && editorResourceID(node.attr("ID")) == editorResourceID(id) {
|
||||
return node, nil
|
||||
}
|
||||
for node := range editorResourceNodes(root, "Fonts", "Font") {
|
||||
if editorResourceID(node.attr("ID")) == editorResourceID(id) {
|
||||
return node, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("font declaration is missing")
|
||||
|
||||
Reference in new issue
Block a user