Momeks / MKPersianFont

MKPersianFont is a great API for developers who need use Persian fonts in their applications this API support TTF font format including “IranNastaliq” and other Persian fonts .
http://momeks.com/
4 stars 0 forks source link

some leaks #1

Open MoathOthman opened 11 years ago

MoathOthman commented 11 years ago

there are some crucial leaks that caused me some problems

first u are not releasing data object !! NSData *data = [[NSData alloc] initWithContentsOfFile:fontPath];

CGDataProviderRef fontProvider = CGDataProviderCreateWithCFData(( CFDataRef)data);
[data release];//

2- u should have a dealloc method -(void)dealloc{

[super dealloc];
NSLog(@"dealloc is persian font called");

[persianFontLayer release];
persianFontLayer=nil;

}

thank you for the useful functions

Momeks commented 11 years ago

Thank you for your mail , I will fix it ;) 


From: Moath othman notifications@github.com To: Momeks/MKPersianFont MKPersianFont@noreply.github.com Sent: Wednesday, October 31, 2012 9:52 AM Subject: [MKPersianFont] some leaks (#1)

there are some crucial leaks that caused me some problems first u are not releasing data object !! NSData *data = [[NSData alloc] initWithContentsOfFile:fontPath]; CGDataProviderRef fontProvider = CGDataProviderCreateWithCFData(( CFDataRef)data); [data release];// 2- u should have a dealloc method -(void)dealloc{ [super dealloc]; NSLog(@"dealloc is persian font called"); [persianFontLayer release]; persianFontLayer=nil; } thank you for the useful functions — Reply to this email directly or view it on GitHub.

MoathOthman commented 11 years ago

your welcome , :+1:

I'm trying it with different fonts , particularly quran fonts ,, it does not work with every font ,, actually it worked for one font and its freeware ,its AAT Font

http://scripts.sil.org/cms/scripts/render_download.php?format=file&media_id=lateef_aat&filename=LateefRegAAT_ttf.zip

did not work with open type fonts , I think I need to do a lot modification on CT and CG Fonts ,, like this one http://scripts.sil.org/cms/scripts/render_download.php?format=file&media_id=lateef_opentype&filename=LateefRegOT_ttf.zip

did u face such things ?!!

thank you :)