summaryrefslogtreecommitdiff
path: root/mkfontscale.c
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-03-17 20:32:18 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-03-17 20:32:18 +0000
commit4e3170fc0e18249d1d6f4aa9952c5701e8df031a (patch)
treee8ac6ffef042fe3bea22fb70a7a2d7bd856b5a40 /mkfontscale.c
parentf420965b8e48aff65f0c181cb36cbd9410e88b1b (diff)
merge with XORG-RELEASE-1 (tag XORG-CYGWIN-LAST-MERGE)CYGWIN-RELEASE-1-MERGE
Diffstat (limited to 'mkfontscale.c')
-rw-r--r--mkfontscale.c36
1 files changed, 28 insertions, 8 deletions
diff --git a/mkfontscale.c b/mkfontscale.c
index 3036752..e891b59 100644
--- a/mkfontscale.c
+++ b/mkfontscale.c
@@ -19,7 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* $XFree86: xc/programs/mkfontscale/mkfontscale.c,v 1.17 2003/11/21 05:22:08 dawes Exp $ */
+/* $XdotOrg: xc/programs/mkfontscale/mkfontscale.c,v 1.1.4.3.4.2 2004/03/04 19:49:27 kaleb Exp $ */
+/* $XFree86: xc/programs/mkfontscale/mkfontscale.c,v 1.21 2003/12/10 02:58:07 dawes Exp $ */
#include <stdio.h>
#include <stdlib.h>
@@ -30,6 +31,7 @@
#include <unistd.h>
#include <errno.h>
+#include <X11/Xos.h>
#include <X11/fonts/fontenc.h>
#include <ft2build.h>
#include FT_FREETYPE_H
@@ -45,6 +47,12 @@
#include "data.h"
#include "ident.h"
+#ifdef NEED_SNPRINTF
+#undef SCOPE
+#define SCOPE static
+#include "snprintf.c"
+#endif
+
#define NPREFIX 1024
#ifndef MAXFONTFILENAMELEN
@@ -56,15 +64,19 @@
char *encodings_array[] =
{ "iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5",
- "iso8859-6", "iso8859-7", "iso8859-8", "iso8859-9", "iso8859-10",
- "iso8859-11", "iso8859-12", "iso8859-13", "iso8859-14", "iso8859-15",
- "koi8-r", "koi8-u", "koi8-ru", "koi8-e", "koi8-uni",
+ "iso8859-6", "iso8859-6.8", "iso8859-6.8x", "iso8859-6.16",
+ "iso8859-7", "iso8859-8", "iso8859-9", "iso8859-10",
+ "iso8859-11", "iso8859-12", "iso8859-13", "iso8859-14",
+ "iso8859-15", "iso8859-16",
+ "ansi-1251", "koi8-r", "koi8-u", "koi8-ru", "koi8-e", "koi8-uni",
"tis620-2",
+ "sun.unicode.india-0",
"adobe-standard", "adobe-symbol",
- "ibm-cp437", "microsoft-cp1252",
+ "ibm-cp437", "ibm-cp850", "ibm-cp852", "ibm-cp866", "microsoft-cp1252",
/* But not "adobe-dingbats", as it uses generic glyph names. */
"jisx0201.1976-0", "jisx0208.1983-0", "jisx0208.1990-0",
- "jisx0212.1990-0", "big5-0", "gb2312.1980-0",
+ "jisx0212.1990-0", "big5-0", "big5.eten-0", "big5hkscs-0",
+ "gb2312.1980-0", "gb18030.2000-0", "gb18030.2000-1",
"ksc5601.1987-0", "ksc5601.1992-3"};
char *extra_encodings_array[] =
@@ -91,6 +103,7 @@ static float bigEncodingFuzz = 0.02;
static int relative;
static int doScalable;
static int doBitmaps;
+static int doISO10646_1_encoding;
static int onlyEncodings;
static ListPtr encodingsToDo;
static int reencodeLegacy;
@@ -104,7 +117,7 @@ usage(void)
"mkfontscale [ -b ] [ -s ] [ -o filename ] [-x suffix ]\n"
" [ -a encoding ] [ -f fuzz ] [ -l ] "
" [ -e directory ] [ -p prefix ] [ -n ] [ -r ] \n"
- " [ directory ]...\n");
+ " [-u] [-U] [ directory ]...\n");
}
int
@@ -134,6 +147,7 @@ main(int argc, char **argv)
countof(extra_encodings_array),
NULL, 0);
doBitmaps = 0;
+ doISO10646_1_encoding = 1;
doScalable = 1;
onlyEncodings = 0;
relative = 0;
@@ -185,6 +199,12 @@ main(int argc, char **argv)
} else if(strcmp(argv[argn], "-b") == 0) {
doBitmaps = 1;
argn++;
+ } else if(strcmp(argv[argn], "-u") == 0) {
+ doISO10646_1_encoding = 0;
+ argn++;
+ } else if(strcmp(argv[argn], "-U") == 0) {
+ doISO10646_1_encoding = 1;
+ argn++;
} else if(strcmp(argv[argn], "-s") == 0) {
doScalable = 0;
argn++;
@@ -1137,7 +1157,7 @@ checkExtraEncoding(FT_Face face, char *encoding_name, int found)
int c;
if(strcasecmp(encoding_name, "iso10646-1") == 0) {
- if(find_cmap(FONT_ENCODING_UNICODE, -1, -1, face)) {
+ if(doISO10646_1_encoding && find_cmap(FONT_ENCODING_UNICODE, -1, -1, face)) {
int found = 0;
/* Export as Unicode if there are at least 15 BMP
characters that are not a space or ignored. */