Lines Matching refs:context

53     NativeScalerContext *context = (NativeScalerContext*)pScalerContext;
55 if (context != NULL) {
56 if (context->xFont != NULL) {
57 AWTFreeFont(context->xFont);
59 free(context);
67 NativeScalerContext *context =
69 context->xFont = NULL;
70 context->minGlyph = 0;
71 context->maxGlyph = 0;
72 context->numGlyphs = 0;
73 context->defaultGlyph = 0;
74 context->ptSize = NO_POINTSIZE;
75 return (jlong)(uintptr_t)context;
83 NativeScalerContext *context;
94 context = (NativeScalerContext*)malloc(sizeof(NativeScalerContext));
96 AWTLoadFont (xlfd, &(context->xFont));
99 if (context->xFont == NULL) { /* NULL means couldn't find the font */
100 free(context);
101 context = NULL;
107 context->minGlyph = (AWTFontMinByte1(context->xFont) << 8) +
108 AWTFontMinCharOrByte2(context->xFont);
109 context->maxGlyph = (AWTFontMaxByte1(context->xFont) << 8) +
110 AWTFontMaxCharOrByte2(context->xFont);
111 context->numGlyphs = context->maxGlyph - context->minGlyph + 1;
112 context->defaultGlyph = AWTFontDefaultChar(context->xFont);
118 if (context->defaultGlyph < context->minGlyph ||
119 context->defaultGlyph > context->maxGlyph) {
120 context->defaultGlyph = context->minGlyph;
122 context->ptSize = ptSize;
123 context->scale = scale;
129 return (jlong)(uintptr_t)context;
205 NativeScalerContext *context = (NativeScalerContext*)
209 if (context == NULL) {
212 int numGlyphs = context->numGlyphs;
213 AWTFreeFont(context->xFont);
214 free(context);
223 NativeScalerContext *context = (NativeScalerContext*)pScalerContext;
224 if (context == NULL) {
227 return (jint)context->maxGlyph+1;
235 NativeScalerContext *context = (NativeScalerContext*)pScalerContext;
236 AWTFont xFont = (AWTFont)context->xFont;
240 if (xFont == NULL || context->ptSize == NO_POINTSIZE) {
244 if (glyphCode < context->minGlyph || glyphCode > context->maxGlyph) {
245 glyphCode = context->defaultGlyph;
254 if ((context->maxGlyph <= 256) && (AWTFontPerChar(xFont, 0) != NULL)) {
255 xcs = AWTFontPerChar(xFont, glyphCode - context->minGlyph);
267 return (jfloat)(advance/context->scale);
274 NativeScalerContext *context = (NativeScalerContext*)pScalerContext;
275 AWTFont xFont = context->xFont;
278 if (xFont == NULL || context->ptSize == NO_POINTSIZE) {
282 if (glyphCode < context->minGlyph || glyphCode > context->maxGlyph) {
295 NativeScalerContext *context = (NativeScalerContext*)pScalerContext;
296 AWTFont xFont = context->xFont;
299 if (xFont == NULL || context->ptSize == NO_POINTSIZE) {
303 if (glyphCode < context->minGlyph || glyphCode > context->maxGlyph) {
304 glyphCode = context->defaultGlyph;
316 NativeScalerContext *context = (NativeScalerContext*)pScalerContext;
317 AWTFont xFont = (AWTFont)context->xFont;
346 /* ay, dy, mx, (float)context->scale); */