Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/curve/editfont.c7
-rw-r--r--source/blender/editors/interface/interface_draw.c12
2 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 44a664b5f30..13678b0dfe5 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1696,7 +1696,8 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
cu = ob->data;
font = cu->vfont;
}
- path = (font && font->name)? font->name: U.fontdir;
+ printf("%s\n", font->name);
+ path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
if(RNA_property_is_set(op->ptr, "filepath"))
return open_exec(C, op);
@@ -1737,7 +1738,7 @@ static int font_unlink_poll(bContext *C)
if (ob->type != OB_FONT) return 0;
cu = ob->data;
- if (cu && strcmp(cu->vfont->name, "<builtin>")==0) return 0;
+ if (cu && strcmp(cu->vfont->name, FO_BUILTIN_NAME)==0) return 0;
return 1;
}
@@ -1755,7 +1756,7 @@ static int font_unlink_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- if (strcmp(font->name, "<builtin>")==0) {
+ if (strcmp(font->name, FO_BUILTIN_NAME)==0) {
BKE_report(op->reports, RPT_WARNING, "Can't unlink the default builtin font.");
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 81b04fea062..768be97f930 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -517,7 +517,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
int charmax = G.charmax;
/* <builtin> font in use. There are TTF <builtin> and non-TTF <builtin> fonts */
- if(!strcmp(G.selfont->name, "<builtin>"))
+ if(!strcmp(G.selfont->name, FO_BUILTIN_NAME))
{
if(G.ui_international == TRUE)
{
@@ -548,8 +548,8 @@ static void ui_draw_but_CHARTAB(uiBut *but)
cs = G.charstart;
- /* Set the font, in case it is not <builtin> font */
- if(G.selfont && strcmp(G.selfont->name, "<builtin>"))
+ /* Set the font, in case it is not FO_BUILTIN_NAME font */
+ if(G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME))
{
char tmpStr[256];
@@ -605,9 +605,9 @@ static void ui_draw_but_CHARTAB(uiBut *but)
memset(wstr, 0, sizeof(wchar_t)*2);
memset(ustr, 0, 16);
- // Set the font to be either unicode or <builtin>
+ // Set the font to be either unicode or FO_BUILTIN_NAME
wstr[0] = cs;
- if(strcmp(G.selfont->name, "<builtin>"))
+ if(strcmp(G.selfont->name, FO_BUILTIN_NAME))
{
wcs2utf8s((char *)ustr, (wchar_t *)wstr);
}
@@ -624,7 +624,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
}
}
- if((G.selfont && strcmp(G.selfont->name, "<builtin>")) || (G.selfont && !strcmp(G.selfont->name, "<builtin>") && G.ui_international == TRUE))
+ if((G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) || (G.selfont && !strcmp(G.selfont->name, FO_BUILTIN_NAME) && G.ui_international == TRUE))
{
float wid;
float llx, lly, llz, urx, ury, urz;