/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <jni.h>
#include <jni_util.h>
#include "fontscalerdefs.h"
#include "X11FontScaler.h"
#ifndef HEADLESS
#include <awt.h>
static int pixmapWidth = 0;
static int pixmapHeight = 0;
#define FONT_AWT_LOCK() \
AWT_LOCK();
{
/* REMIND: use the actual screen, not the default screen */
if (width < 100) {
width = 100;
}
if (height < 100) {
height = 100;
}
pixmapWidth = width;
if (pixmap != 0) {
}
}
pixmapHeight, 1);
if (pixmap == 0) {
return BadAlloc;
}
return BadAlloc;
}
return Success;
}
#ifdef DUMP_IMAGES
{
int row;
int column;
}
}
}
#endif
#endif /* !HEADLESS */
#ifdef HEADLESS
return 0;
#else
char **names;
int count;
AWT_UNLOCK();
return count;
#endif /* !HEADLESS */
}
#ifndef HEADLESS
AWT_UNLOCK();
#endif /* !HEADLESS */
}
#ifndef HEADLESS
AWT_UNLOCK();
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return NULL;
#else
return NULL;
}
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifndef HEADLESS
/* There is a claim from the pre 1.5 source base that the info in the
* XFontStruct is flaky for 16 byte chars. This seems plausible as
* for info to be valid, that struct would need a large number of
* XCharStructs. But there's nothing in the X APIs which warns you of
* this. If it really is flaky you must question why there's an
* XTextExtents16 API call. Try XTextExtents16 for now and if it fails
* go back to XQueryTextExtents16 in this function.
* Indeed the metrics from the Solaris 9 JA font
* -ricoh-gothic-medium-r-normal--*-140-72-72-m-*-jisx0208.1983-0
* do appear different so revert to the query api
*/
/* XTextExtents16(xFont, xChar, 1, &direction, &ascent, &descent, newChar); */
AWT_UNLOCK();
#endif /* !HEADLESS */
}
#ifndef HEADLESS
#endif /* !HEADLESS */
}
#ifndef HEADLESS
int h, i, j, nbytes;
unsigned int imageSize;
/* XTextExtents16(xFont, xChar, 1, &direction, &ascent, &descent, &xcs); */
if (imageSize == 0) {
AWT_UNLOCK();
} else {
}
AWT_UNLOCK();
}
}
AWT_UNLOCK();
}
#ifdef DUMP_IMAGES
#endif
for (h=0; h<height; h++) {
for (i = 0; i < wholeByteCount; i++) {
for (j = 0; j < 8; j++) {
srcValue >>= 1;
} else { /* MSBFirst */
srcValue <<= 1;
}
}
}
if (remainingBitsCount) {
for (j = 0; j < remainingBitsCount; j++) {
srcValue >>= 1;
} else { /* MSBFirst */
srcValue <<= 1;
}
}
}
}
AWT_UNLOCK();
#else
return (jlong)0;
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}
#ifdef HEADLESS
return 0;
#else
#endif /* !HEADLESS */
}