Page MenuHomePhabricator

edje/style: Fix a problem where embedded font does not load in edj
ClosedPublic

Authored by bowonryu on Feb 24 2020, 2:26 AM.

Details

Summary

When edje_font_is_embedded the path of the font must be "font=edje/fonts/%s"
The previous code is "font=%s"
This causes the font to not load properly when edje_font_is_embedded.

Test Plan

edje_cc test.edc
edje_player test.edj

collections {

group { "main";
    fonts {
        // Set any two fonts in your local path.
        font: "ANYFONT_1.TTF" "font_1";
        font: "ANYFONT_2.TTF" "font_2";
    }
    styles {
        style { name: "textblock_style_1";
            base: "font=font_1 font_size=30 color=#ffffff";
        }
        style { name: "textblock_style_2";
            base: "font=font_2 font_size=30 color=#ffffff";
        }
    }
    parts {
        spacer { "base";
            scale;
            desc { "default";
                min: 600 250;
                max: 600 250;
            }
        }
        rect { "bg";
            scale;
            desc { "default";
                rel.to: "base";
                color: 5 5 5 255;
            }
        }
        textblock { "tb1";
            scale;
            desc { "default";
                rel.to: base;
                rel1.relative: 0 0;
                rel2.relative: 1 0.5;
                text.text: "THIS IS FONT 1";
                text.style: "textblock_style_1";
            }
        }
        textblock { "tb2";
            scale;
            desc { "default";
                rel.to: base;
                rel1.relative: 0 0.5;
                rel2.relative: 1 1;
                text.text: "THIS IS FONT 2";
                text.style: "textblock_style_2";
            }
        }
    }
}

}

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16121
Build 10862: arc lint + arc unit
bowonryu created this revision.Feb 24 2020, 2:26 AM
bowonryu requested review of this revision.Feb 24 2020, 2:26 AM

indeed solves the issue.

@Hermet , hermet can review and push the change.

Hermet accepted this revision.Feb 24 2020, 3:16 AM
This revision is now accepted and ready to land.Feb 24 2020, 3:16 AM
This revision was automatically updated to reflect the committed changes.