< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/awt/CTextPipe.m
Print this page
*** 240,263 ****
CGContextSetTextMatrix(cgRef, CGAffineTransformIdentity); // resets the damage from CoreText
NSString *string = [NSString stringWithCharacters:chars length:length];
/*
! The calls below were used previously but for unknown reason did not
! render using the right font (see bug 7183516) when attribString is not
! initialized with font dictionary attributes. It seems that "options"
! in CTTypesetterCreateWithAttributedStringAndOptions which contains the
font dictionary is ignored.
NSAttributedString *attribString = [[NSAttributedString alloc] initWithString:string];
CTTypesetterRef typeSetterRef = CTTypesetterCreateWithAttributedStringAndOptions((CFAttributedStringRef) attribString, (CFDictionaryRef) ctsDictionaryFor(nsFont, JRSFontStyleUsesFractionalMetrics(strike->fStyle)));
*/
NSAttributedString *attribString = [[NSAttributedString alloc]
initWithString:string
attributes:ctsDictionaryFor(nsFont, JRSFontStyleUsesFractionalMetrics(strike->fStyle))];
!
CTTypesetterRef typeSetterRef = CTTypesetterCreateWithAttributedString((CFAttributedStringRef) attribString);
CFRange range = {0, length};
CTLineRef lineRef = CTTypesetterCreateLine(typeSetterRef, range);
--- 240,263 ----
CGContextSetTextMatrix(cgRef, CGAffineTransformIdentity); // resets the damage from CoreText
NSString *string = [NSString stringWithCharacters:chars length:length];
/*
! The calls below were used previously but for unknown reason did not
! render using the right font (see bug 7183516) when attribString is not
! initialized with font dictionary attributes. It seems that "options"
! in CTTypesetterCreateWithAttributedStringAndOptions which contains the
font dictionary is ignored.
NSAttributedString *attribString = [[NSAttributedString alloc] initWithString:string];
CTTypesetterRef typeSetterRef = CTTypesetterCreateWithAttributedStringAndOptions((CFAttributedStringRef) attribString, (CFDictionaryRef) ctsDictionaryFor(nsFont, JRSFontStyleUsesFractionalMetrics(strike->fStyle)));
*/
NSAttributedString *attribString = [[NSAttributedString alloc]
initWithString:string
attributes:ctsDictionaryFor(nsFont, JRSFontStyleUsesFractionalMetrics(strike->fStyle))];
!
CTTypesetterRef typeSetterRef = CTTypesetterCreateWithAttributedString((CFAttributedStringRef) attribString);
CFRange range = {0, length};
CTLineRef lineRef = CTTypesetterCreateLine(typeSetterRef, range);
*** 350,365 ****
static JNF_CLASS_CACHE(jc_StandardGlyphVector_GlyphTransformInfo, "sun/font/StandardGlyphVector$GlyphTransformInfo");
static JNF_MEMBER_CACHE(jm_StandardGlyphVector_GlyphTransformInfo_transforms, jc_StandardGlyphVector_GlyphTransformInfo, "transforms", "[D");
jdoubleArray g_gtiTransformsArray = JNFGetObjectField(env, gti, jm_StandardGlyphVector_GlyphTransformInfo_transforms); //(*env)->GetObjectField(env, gti, g_gtiTransforms);
if (g_gtiTransformsArray == NULL) {
return;
! }
jdouble *g_gvTransformsAsDoubles = (*env)->GetPrimitiveArrayCritical(env, g_gtiTransformsArray, NULL);
if (g_gvTransformsAsDoubles == NULL) {
(*env)->DeleteLocalRef(env, g_gtiTransformsArray);
return;
! }
static JNF_MEMBER_CACHE(jm_StandardGlyphVector_GlyphTransformInfo_indices, jc_StandardGlyphVector_GlyphTransformInfo, "indices", "[I");
jintArray g_gtiTXIndicesArray = JNFGetObjectField(env, gti, jm_StandardGlyphVector_GlyphTransformInfo_indices);
jint *g_gvTXIndicesAsInts = (*env)->GetPrimitiveArrayCritical(env, g_gtiTXIndicesArray, NULL);
if (g_gvTXIndicesAsInts == NULL) {
--- 350,365 ----
static JNF_CLASS_CACHE(jc_StandardGlyphVector_GlyphTransformInfo, "sun/font/StandardGlyphVector$GlyphTransformInfo");
static JNF_MEMBER_CACHE(jm_StandardGlyphVector_GlyphTransformInfo_transforms, jc_StandardGlyphVector_GlyphTransformInfo, "transforms", "[D");
jdoubleArray g_gtiTransformsArray = JNFGetObjectField(env, gti, jm_StandardGlyphVector_GlyphTransformInfo_transforms); //(*env)->GetObjectField(env, gti, g_gtiTransforms);
if (g_gtiTransformsArray == NULL) {
return;
! }
jdouble *g_gvTransformsAsDoubles = (*env)->GetPrimitiveArrayCritical(env, g_gtiTransformsArray, NULL);
if (g_gvTransformsAsDoubles == NULL) {
(*env)->DeleteLocalRef(env, g_gtiTransformsArray);
return;
! }
static JNF_MEMBER_CACHE(jm_StandardGlyphVector_GlyphTransformInfo_indices, jc_StandardGlyphVector_GlyphTransformInfo, "indices", "[I");
jintArray g_gtiTXIndicesArray = JNFGetObjectField(env, gti, jm_StandardGlyphVector_GlyphTransformInfo_indices);
jint *g_gvTXIndicesAsInts = (*env)->GetPrimitiveArrayCritical(env, g_gtiTXIndicesArray, NULL);
if (g_gvTXIndicesAsInts == NULL) {
< prev index next >