205 206 isIdentityMatrix = (txMat[0] == 1 && txMat[1] == 0 && 207 txMat[2] == 0 && txMat[3] == 1); 208 209 if (!isIdentityMatrix) { 210 xx = adjustment.fX; 211 xy = xx * txMat[1]; 212 xx = xx * txMat[0]; 213 214 yy = adjustment.fY; 215 yx = yy * txMat[2]; 216 yy = yy * txMat[3]; 217 218 adjustment.fX = xx + yx; 219 adjustment.fY = xy + yy; 220 } 221 222 jobject pt = env->NewObject(sunFontIDs.pt2DFloatClass, 223 sunFontIDs.pt2DFloatCtr, 224 adjustment.fX, adjustment.fY); 225 env->CallObjectMethod(fontStrike, sunFontIDs.adjustPointMID, pt); 226 adjustment.fX = env->GetFloatField(pt, sunFontIDs.xFID); 227 adjustment.fY = env->GetFloatField(pt, sunFontIDs.yFID); 228 } 229 230 void FontInstanceAdapter::getWideGlyphAdvance(le_uint32 glyph, LEPoint &advance) const 231 { 232 if ((glyph & 0xfffe) == 0xfffe) { 233 advance.fX = 0; 234 advance.fY = 0; 235 return; 236 } 237 jobject pt = env->CallObjectMethod(fontStrike, 238 sunFontIDs.getGlyphMetricsMID, glyph); 239 if (pt != NULL) { 240 advance.fX = env->GetFloatField(pt, sunFontIDs.xFID); 241 advance.fY = env->GetFloatField(pt, sunFontIDs.yFID); 242 env->DeleteLocalRef(pt); 243 } 244 } 245 246 le_bool FontInstanceAdapter::getGlyphPoint(LEGlyphID glyph, 247 le_int32 pointNumber, | 205 206 isIdentityMatrix = (txMat[0] == 1 && txMat[1] == 0 && 207 txMat[2] == 0 && txMat[3] == 1); 208 209 if (!isIdentityMatrix) { 210 xx = adjustment.fX; 211 xy = xx * txMat[1]; 212 xx = xx * txMat[0]; 213 214 yy = adjustment.fY; 215 yx = yy * txMat[2]; 216 yy = yy * txMat[3]; 217 218 adjustment.fX = xx + yx; 219 adjustment.fY = xy + yy; 220 } 221 222 jobject pt = env->NewObject(sunFontIDs.pt2DFloatClass, 223 sunFontIDs.pt2DFloatCtr, 224 adjustment.fX, adjustment.fY); 225 if (pt == NULL) { 226 env->ExceptionClear(); 227 adjustment.fX = 0.0f; 228 adjustment.fY = 0.0f; 229 } else { 230 env->CallObjectMethod(fontStrike, sunFontIDs.adjustPointMID, pt); 231 adjustment.fX = env->GetFloatField(pt, sunFontIDs.xFID); 232 adjustment.fY = env->GetFloatField(pt, sunFontIDs.yFID); 233 } 234 } 235 236 void FontInstanceAdapter::getWideGlyphAdvance(le_uint32 glyph, LEPoint &advance) const 237 { 238 if ((glyph & 0xfffe) == 0xfffe) { 239 advance.fX = 0; 240 advance.fY = 0; 241 return; 242 } 243 jobject pt = env->CallObjectMethod(fontStrike, 244 sunFontIDs.getGlyphMetricsMID, glyph); 245 if (pt != NULL) { 246 advance.fX = env->GetFloatField(pt, sunFontIDs.xFID); 247 advance.fY = env->GetFloatField(pt, sunFontIDs.yFID); 248 env->DeleteLocalRef(pt); 249 } 250 } 251 252 le_bool FontInstanceAdapter::getGlyphPoint(LEGlyphID glyph, 253 le_int32 pointNumber, |