summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-4.8.1/samples/layout/FontMap.h
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-08-10 12:03:08 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-08-10 12:03:08 +0000
commit79b8b3a76d8eda7372bb4dedae0ec7aebdaebc12 (patch)
tree9e4992c8719febb576deb6120740611380d71f7a /Build/source/libs/icu/icu-4.8.1/samples/layout/FontMap.h
parent8cd13eb8f4bb7b92c6d9bb50aff9a62c37df026c (diff)
icu 4.8.1
git-svn-id: svn://tug.org/texlive/trunk@23480 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu/icu-4.8.1/samples/layout/FontMap.h')
-rw-r--r--Build/source/libs/icu/icu-4.8.1/samples/layout/FontMap.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/Build/source/libs/icu/icu-4.8.1/samples/layout/FontMap.h b/Build/source/libs/icu/icu-4.8.1/samples/layout/FontMap.h
new file mode 100644
index 00000000000..fa80ebfd090
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.8.1/samples/layout/FontMap.h
@@ -0,0 +1,66 @@
+/*
+ ******************************************************************************
+ * Copyright (C) 1998-2003, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ ******************************************************************************
+ */
+
+#ifndef __FONTMAP_H
+#define __FONTMAP_H
+
+#include "layout/LETypes.h"
+#include "layout/LEScripts.h"
+#include "layout/LEFontInstance.h"
+
+#include "GUISupport.h"
+
+#define BUFFER_SIZE 128
+
+class FontMap
+{
+public:
+ FontMap(const char *fileName, le_int16 pointSize, GUISupport *guiSupport, LEErrorCode &status);
+
+ virtual ~FontMap();
+
+ virtual const LEFontInstance *getScriptFont(le_int32 scriptCode, LEErrorCode &status);
+
+ virtual le_int16 getPointSize() const;
+
+ virtual le_int32 getAscent() const;
+
+ virtual le_int32 getDescent() const;
+
+ virtual le_int32 getLeading() const;
+
+protected:
+ virtual const LEFontInstance *openFont(const char *fontName, le_int16 pointSize, LEErrorCode &status) = 0;
+
+ char errorMessage[256];
+
+private:
+ static char *strip(char *s);
+ le_int32 getFontIndex(const char *fontName);
+ void getMaxMetrics();
+
+ le_int16 fPointSize;
+ le_int32 fFontCount;
+
+ le_int32 fAscent;
+ le_int32 fDescent;
+ le_int32 fLeading;
+
+ GUISupport *fGUISupport;
+
+ const LEFontInstance *fFontInstances[scriptCodeCount];
+ const char *fFontNames[scriptCodeCount];
+ le_int32 fFontIndices[scriptCodeCount];
+};
+
+inline le_int16 FontMap::getPointSize() const
+{
+ return fPointSize;
+}
+
+#endif
+