summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cocoa/BrowserView.m1
-rw-r--r--cocoa/HistoryView.m1
-rw-r--r--cocoa/Tree.m1
-rw-r--r--cocoa/font.h1
-rw-r--r--cocoa/font.m11
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];