/*
* 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.
*/
#import "java_awt_Font.h"
#import "sun_awt_PlatformFont.h"
#import "sun_awt_FontDescriptor.h"
#import "sun_font_CFont.h"
#import "sun_font_CFontManager.h"
#import "AWTFont.h"
#import "AWTStrike.h"
#import "CoreTextSupport.h"
if (self) {
}
return self;
}
- (void) dealloc {
if (fNativeCGFont) {
}
[super dealloc];
}
- (void) finalize {
if (fNativeCGFont) {
}
[super finalize];
}
{
// create font with family & size
// if can't get font of that name, substitute system default font
}
// create an italic style (if one is installed)
if (style & java_awt_Font_ITALIC) {
}
// create a bold style (if one is installed)
if (style & java_awt_Font_BOLD) {
}
}
NSLog(@"nil font");
return nil;
}
// obtain the Font2D
NSLog(@"nil font2d");
return nil;
}
// if it's not a CFont, it's likely one of TTF or OTF fonts
// from the Sun rendering loops
NSLog(@"font2d !instanceof CFont");
return nil;
}
static JNF_MEMBER_CACHE(jm_CFont_getFontStrike, jc_CFont, "getStrike", "(Ljava/awt/Font;)Lsun/font/FontStrike;");
NSLog(@"fontStrike !instanceof CStrike");
return nil;
}
if (awtStrikePtr == 0L) {
NSLog(@"nil nativeFontPtr from CFont");
return nil;
}
return [NSFont fontWithName:[strike->fAWTFont->fFont fontName] matrix:(CGFloat *)(&(strike->fAltTx))];
}
@end
static NSString*
{
}
static NSArray*
{
if (sFilteredFonts == nil) {
continue;
}
}
}
}
}
return sFilteredFonts;
}
{
myFSRefPtr, NULL);
}
// /*
// * Class: sun_font_CFontManager
// * Method: loadFileFont
// */
// JNIEXPORT /* sun.font.CFont */ jobject JNICALL
// Java_sun_font_CFontManager_loadFileFont
// (JNIEnv *env, jclass obj, jstring fontpath)
// {
// jobject result = NULL;
//
// JNF_COCOA_ENTER(env);
//
// NSString *nsFilePath = JNFJavaToNSString(env, fontpath);
// jstring javaFontName = NULL;
//
// //
// // Note: This API uses ATS and can therefore return Carbon error codes.
// // These codes can be found at:
// //
//
// FSRef iFile;
// OSStatus status = CreateFSRef(&iFile, nsFilePath);
//
// if (status == noErr) {
// ATSFontContainerRef oContainer;
// status = ATSFontActivateFromFileReference(&iFile, kATSFontContextLocal,
// kATSFontFormatUnspecified,
// NULL,
// kATSOptionFlagsUseDataFork,
// &oContainer);
// if (status == noErr) {
// ATSFontRef ioArray[1];
// ItemCount oCount;
// status = ATSFontFindFromContainer(oContainer,
// kATSOptionFlagsUseDataFork,
// 1, ioArray, &oCount);
//
// if (status == noErr) {
// CFStringRef oName;
// status = ATSFontGetPostScriptName(ioArray[0],
// kATSOptionFlagsUseDataFork,
// &oName);
// if (status == noErr) {
// javaFontName = JNFNSToJavaString(env, (NSString *)oName);
// CFRelease(oName);
// }
// }
// }
// }
//
// if (javaFontName != NULL) {
// // create the CFont!
// static JNF_CTOR_CACHE(sjf_CFont_ctor,
// result = JNFNewObject(env, sjf_CFont_ctor, javaFontName);
// }
//
// JNF_COCOA_EXIT(env);
//
// return result;
// }
/*
* Class: sun_font_CFontManager
* Method: loadNativeFonts
* Signature: ()V
*/
{
static JNF_CLASS_CACHE(jc_CFontManager,
"sun/font/CFontManager");
"registerFont",
jint i;
for (i = 0; i < num; i++) {
}
}
/*
* Class: Java_sun_font_CFontManager_loadNativeDirFonts
* Method: loadNativeDirFonts
*/
{
&oContainer);
}
}
/*
* Class: sun_font_CFont
* Method: initNativeFont
*/
{
awtFont =
if (awtFont) {
}
return ptr_to_jlong(awtFont);
}
/*
* Class: sun_font_CFont
* Method: disposeNativeFont
* Signature: (J)V
*/
{
if (awtFontPtr) {
}
}
/*
* Class: sun_awt_PlatformFont
* Method: initIDs
* Signature: ()V
*/
{
}
/*
* Class: sun_awt_FontDescriptor
* Method: initIDs
* Signature: ()V
*/
{
}