Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/mkfontscale/dist Use a case insensitive compa...
details: https://anonhg.NetBSD.org/xsrc/rev/4c9d0efc80dd
branches: trunk
changeset: 10408:4c9d0efc80dd
user: maya <maya%NetBSD.org@localhost>
date: Sun Oct 27 17:38:08 2019 +0000
description:
Use a case insensitive comparison. Add ExtraBold.
Fixes PR xsrc/40609: Problem with mkfontscale and fonts/freefonts with
xfree/xorg
diffstat:
external/mit/mkfontscale/dist/mkfontscale.c | 34 ++++++++++++++++------------
1 files changed, 19 insertions(+), 15 deletions(-)
diffs (56 lines):
diff -r 60ce8084e8e9 -r 4c9d0efc80dd external/mit/mkfontscale/dist/mkfontscale.c
--- a/external/mit/mkfontscale/dist/mkfontscale.c Thu Oct 24 18:19:27 2019 +0000
+++ b/external/mit/mkfontscale/dist/mkfontscale.c Sun Oct 27 17:38:08 2019 +0000
@@ -435,33 +435,37 @@
{
if(!weight)
return NULL;
- if(strcmp(weight, "Thin") == 0)
+ if(strcasecmp(weight, "Thin") == 0)
return "thin";
- if(strcmp(weight, "ExtraLight") == 0) /* FontForge uses this for 200*/
+ if(strcasecmp(weight, "ExtraLight") == 0) /* FontForge uses this for 200*/
return "extralight";
- if(strcmp(weight, "Light") == 0)
+ if(strcasecmp(weight, "Light") == 0)
return "light";
- if(strcmp(weight, "Regular") == 0)
+ if(strcasecmp(weight, "Regular") == 0)
return "medium";
- if(strcmp(weight, "Normal") == 0)
+ if(strcasecmp(weight, "Plain") == 0)
return "medium";
- if(strcmp(weight, "Medium") == 0)
+ if(strcasecmp(weight, "Normal") == 0)
return "medium";
- if(strcmp(weight, "Book") == 0)
+ if(strcasecmp(weight, "Medium") == 0)
+ return "medium";
+ if(strcasecmp(weight, "Book") == 0)
return "medium";
- if(strcmp(weight, "Roman") == 0) /* Some URW++ fonts do that! */
+ if(strcasecmp(weight, "Roman") == 0) /* Some URW++ fonts do that! */
return "medium";
- if(strcmp(weight, "Demi") == 0)
+ if(strcasecmp(weight, "Demi") == 0)
return "semibold";
- if(strcmp(weight, "DemiBold") == 0)
+ if(strcasecmp(weight, "DemiBold") == 0)
+ return "semibold";
+ if(strcasecmp(weight, "SemiBold") == 0) /* some TeX fonts apparently do that */
return "semibold";
- if(strcmp(weight, "SemiBold") == 0) /* some TeX fonts apparently do that */
- return "semibold";
- else if(strcmp(weight, "Bold") == 0)
+ else if(strcasecmp(weight, "Bold") == 0)
return "bold";
- else if(strcmp(weight, "Heavy") == 0) /* FontForge uses this for 800*/
+ else if(strcasecmp(weight, "Heavy") == 0) /* FontForge uses this for 800*/
return "extrabold";
- else if(strcmp(weight, "Black") == 0)
+ else if(strcasecmp(weight, "ExtraBold") == 0) /* freefonts uses this */
+ return "extrabold";
+ else if(strcasecmp(weight, "Black") == 0)
return "black";
else {
fprintf(stderr, "Unknown Type 1 weight \"%s\"\n", weight);
Home |
Main Index |
Thread Index |
Old Index