This commit is contained in:
Vincent Wei
2019-02-28 19:08:05 +08:00
parent 00eb4e363f
commit 090824cb91
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ BOOL fontGetFamilyFromName (const char* name, char* family)
if (*(++family_part) == '\0')
return FALSE;
while (family_part [i] && i <= LEN_LOGFONT_NAME_FIELD) {
while (family_part [i] && i <= LEN_LOGFONT_FAMILY_FILED) {
if (family_part [i] == '-' || family_part [i] == ',') {
family [i] = '\0';
break;
@@ -157,7 +157,7 @@ static BOOL get_family_part_lower (const char* name, char* family)
BOOL fontDoesMatchFamily (const char* name, const char* family)
{
// make sure there is a redundant space for the tail character.
char family_part[LEN_UNIDEVFONT_NAME + 2];
char family_part[LEN_LOGFONT_FAMILY_FILED + 2];
char family_request[LEN_LOGFONT_NAME_FIELD + 2];
int i = 0;
size_t len;
+2 -2
View File
@@ -172,8 +172,8 @@ static PLOGFONT gdiCreateLogFont (const char* type, const char* family,
else {
_DBG_PRINTF ("FONT>LogFont: try to match MBC Devfont for family (%s)\n",
name_field);
if ((devfonts[i] = font_GetMatchedSBDevFont (newlf, name_field)) == NULL)
goto error;
if ((devfonts[i] = font_GetMatchedMBDevFont (newlf, name_field)) == NULL)
break;
iter += n;
if (*iter == ',' || *iter == ' ')
+1 -1
View File
@@ -103,7 +103,7 @@ BOOL mg_InitSysFont (void)
for (i = 0; i < nr_fonts; i++) {
char key [11];
char type [LEN_LOGFONT_NAME_FIELD + 1];
char family [LEN_LOGFONT_NAME_FIELD + 1];
char family [LEN_LOGFONT_FAMILY_FILED + 1];
char style [LEN_LOGFONT_NAME_FIELD + 1];
char charset [LEN_LOGFONT_NAME_FIELD + 1];
char font_name [LEN_DEVFONT_NAME + 1];