Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change font size does not work #5

Closed
vladubogdan opened this issue Jan 15, 2013 · 6 comments
Closed

Change font size does not work #5

vladubogdan opened this issue Jan 15, 2013 · 6 comments
Assignees
Labels

Comments

@vladubogdan
Copy link

No matter what value you give to setFontSize it does not do anything.
Is there any special settings that needs to be performed before calling this method?

@faceleg
Copy link
Collaborator

faceleg commented Jan 15, 2013

Hi @vladubogdan, you shouldn't be required to do anything special. I might have got the JavaScript function call wrong, I will investigate this when I get a chance.

The relevant line is: https://github.com/faceleg/ACEView/blob/master/ACEView/Source/ACEView.m#L253

@vladubogdan
Copy link
Author

Everything seams to be ok in ACEView class. So i guess the problem is in Ace itself or maybe ace needs some special handling.

@faceleg
Copy link
Collaborator

faceleg commented Jan 16, 2013

I may have misinterpreted the Ace documentation, I've done it before. When I get a chance I'll re-read that section and make the required changes. Thanks for bringing this up!

@ghost ghost assigned faceleg Jan 16, 2013
@vladubogdan
Copy link
Author

Ok it seams that setFontSize wants values like '18px' so the correct implementation for ACEView will be

- (void) setFontSize:(NSUInteger)size {
    [self executeScriptWhenLoaded:[NSString stringWithFormat:@"editor.setFontSize('%dpx');", (int)size]];
}

I already tested this and it works.

In another non related thing - do you know of a way to create bubble strings (just like the folding marker but with text instead of 3 points '...') in ace?

Thank you for this amazing framework.

@faceleg
Copy link
Collaborator

faceleg commented Jan 17, 2013

Great job! If you commit that and submit a pull request I'll accepted it when I can, otherwise I won't be able to fix this & other outstanding issues until later this week.

No problem! For Code Complete I had the option of extending a very old & confusing Cocoa framework (my research revealed no good Cocoa syntax highlighters), or leveraging the immense work put into Ace by creating this framework.

I'm very pleased you find it useful!

@faceleg
Copy link
Collaborator

faceleg commented Jan 17, 2013

In another non related thing - do you know of a way to create bubble strings (just like the folding marker but with text instead of 3 points '...') in ace?

No I don't, you could try asking on the Ace Google Group?

If you succeed please let me know how you did it, we could look at adding the functionality to the ACEView framework. You could reach me here or with mike@pagesofinterest.net.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants