diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-03-14 14:17:46 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-03-14 14:17:46 +0000 |
commit | 19c5c44e7a4d99d1a62aff8ed40739a12080e197 (patch) | |
tree | 475037b227a37037914ade48f32b0dfc57aea04a /cocoa | |
parent | 0fc9da23f6d971f7c4b0bc38f25552fea84be172 (diff) | |
download | netsurf-19c5c44e7a4d99d1a62aff8ed40739a12080e197.tar.gz netsurf-19c5c44e7a4d99d1a62aff8ed40739a12080e197.tar.bz2 |
Getting rid of cocoa_set_font_scale_factor
svn path=/trunk/netsurf/; revision=12042
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/BrowserView.m | 1 | ||||
-rw-r--r-- | cocoa/HistoryView.m | 1 | ||||
-rw-r--r-- | cocoa/Tree.m | 1 | ||||
-rw-r--r-- | cocoa/font.h | 1 | ||||
-rw-r--r-- | cocoa/font.m | 11 |
5 files changed, 1 insertions, 14 deletions
diff --git a/cocoa/BrowserView.m b/cocoa/BrowserView.m index ba83c3470..2e0b0b87f 100644 --- a/cocoa/BrowserView.m +++ b/cocoa/BrowserView.m @@ -147,7 +147,6 @@ static inline NSRect cocoa_get_caret_rect( BrowserView *view ) NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; current_redraw_browser = browser; - cocoa_set_font_scale_factor( browser->scale ); const NSRect *rects = NULL; NSInteger count = 0; diff --git a/cocoa/HistoryView.m b/cocoa/HistoryView.m index 6c1c44587..65f971d28 100644 --- a/cocoa/HistoryView.m +++ b/cocoa/HistoryView.m @@ -57,7 +57,6 @@ [[NSColor clearColor] set]; [NSBezierPath fillRect: rect]; - cocoa_set_font_scale_factor( 1.0 ); cocoa_set_clip( rect ); history_redraw( browser->history ); diff --git a/cocoa/Tree.m b/cocoa/Tree.m index 005b1aefe..507dc3658 100644 --- a/cocoa/Tree.m +++ b/cocoa/Tree.m @@ -124,7 +124,6 @@ static void tree_get_window_dimensions( int *width, int *height, void *data ) - (void) drawRect: (NSRect) rect inView: (NSView *) view; { - cocoa_set_font_scale_factor( 1.0 ); tree_draw( tree, 0, 0, cocoa_pt_to_px( NSMinX( rect ) ), cocoa_pt_to_px( NSMinY( rect )), cocoa_pt_to_px( NSWidth( rect ) ), cocoa_pt_to_px( NSHeight( rect ) ) ); } diff --git a/cocoa/font.h b/cocoa/font.h index b3d441102..2a31e2c08 100644 --- a/cocoa/font.h +++ b/cocoa/font.h @@ -22,6 +22,5 @@ #import "desktop/plot_style.h" void cocoa_draw_string( CGFloat x, CGFloat y, const char *bytes, size_t length, const plot_font_style_t *style ); -void cocoa_set_font_scale_factor( float newFactor ); #endif diff --git a/cocoa/font.m b/cocoa/font.m index a109d027f..915e7c826 100644 --- a/cocoa/font.m +++ b/cocoa/font.m @@ -38,7 +38,6 @@ static NSDictionary *cocoa_font_attributes( const plot_font_style_t *style ); static NSTextStorage *cocoa_text_storage = nil; static NSTextContainer *cocoa_text_container = nil; -static CGFloat cocoa_font_scale_factor = 1.0; static bool nsfont_width(const plot_font_style_t *style, const char *string, size_t length, @@ -106,17 +105,9 @@ const struct font_functions nsfont = { #pragma mark - -void cocoa_set_font_scale_factor( float newFactor ) -{ - cocoa_font_scale_factor = newFactor; -} - void cocoa_draw_string( CGFloat x, CGFloat y, const char *bytes, size_t length, const plot_font_style_t *style ) { - plot_font_style_t actualStyle = *style; - actualStyle.size = (CGFloat)actualStyle.size * cocoa_font_scale_factor; - - NSLayoutManager *layout = cocoa_prepare_layout_manager( bytes, length, &actualStyle ); + NSLayoutManager *layout = cocoa_prepare_layout_manager( bytes, length, style ); if (layout == nil) return; NSFont *font = [cocoa_text_storage attribute: NSFontAttributeName atIndex: 0 effectiveRange: NULL]; |