summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--amiga/font.c4
-rwxr-xr-xamiga/font.h2
-rw-r--r--amiga/font_bullet.c6
-rw-r--r--amiga/plotters.c11
4 files changed, 10 insertions, 13 deletions
diff --git a/amiga/font.c b/amiga/font.c
index b7e31cea8..27ea62d6e 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -36,14 +36,14 @@ void ami_font_setdevicedpi(int id)
{
DisplayInfoHandle dih;
struct DisplayInfo dinfo;
- ULONG ydpi = nsoption_int(screen_ydpi);
- ULONG xdpi = nsoption_int(screen_ydpi);
if(nsoption_bool(bitmap_fonts) == true) {
LOG("WARNING: Using diskfont.library for text. Forcing DPI to 72.");
nsoption_set_int(screen_ydpi, 72);
}
+ ULONG ydpi = nsoption_int(screen_ydpi);
+ ULONG xdpi = nsoption_int(screen_ydpi);
browser_set_dpi(nsoption_int(screen_ydpi));
if(id && (nsoption_int(monitor_aspect_x) != 0) && (nsoption_int(monitor_aspect_y) != 0))
diff --git a/amiga/font.h b/amiga/font.h
index 416609a8d..e0799ea05 100755
--- a/amiga/font.h
+++ b/amiga/font.h
@@ -23,8 +23,6 @@
#include <graphics/rastport.h>
#include <graphics/text.h>
-struct ami_font_cache_node;
-
void ami_font_setdevicedpi(int id);
void ami_font_init(void);
void ami_font_fini(void);
diff --git a/amiga/font_bullet.c b/amiga/font_bullet.c
index 2800533a0..69757e5a3 100644
--- a/amiga/font_bullet.c
+++ b/amiga/font_bullet.c
@@ -155,7 +155,7 @@ static inline uint32 amiga_nsfont_decode_surrogate(const uint16 *char1)
}
}
-static inline bool amiga_nsfont_width(const plot_font_style_t *fstyle,
+static bool amiga_nsfont_width(const plot_font_style_t *fstyle,
const char *string, size_t length,
int *width)
{
@@ -178,7 +178,7 @@ static inline bool amiga_nsfont_width(const plot_font_style_t *fstyle,
* \return true on success, false on error and error reported
*/
-static inline bool amiga_nsfont_position_in_string(const plot_font_style_t *fstyle,
+static bool amiga_nsfont_position_in_string(const plot_font_style_t *fstyle,
const char *string, size_t length,
int x, size_t *char_offset, int *actual_x)
{
@@ -261,7 +261,7 @@ static inline bool amiga_nsfont_position_in_string(const plot_font_style_t *fsty
* Returning char_offset == length means no split possible
*/
-static inline bool amiga_nsfont_split(const plot_font_style_t *fstyle,
+static bool amiga_nsfont_split(const plot_font_style_t *fstyle,
const char *string, size_t length,
int x, size_t *char_offset, int *actual_x)
{
diff --git a/amiga/plotters.c b/amiga/plotters.c
index b459dcc7e..d241dd408 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -94,7 +94,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
* Height is set to screen width to give enough space for thumbnails *
* Also applies to the further gfx/layers functions and memory below */
- ULONG depth = 32;
+ int depth = 32;
struct BitMap *friend = NULL;
depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH);
@@ -112,6 +112,8 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
if(depth > 8) depth = 8;
#endif
+ if(palette_mapped == true) nsoption_set_bool(font_antialiasing, false);
+
if(!width) width = nsoption_int(redraw_tile_size_x);
if(!height) height = nsoption_int(redraw_tile_size_y);
gg->width = width;
@@ -429,13 +431,10 @@ static bool ami_text(int x, int y, const char *text, size_t length,
LOG("[ami_plotter] Entered ami_text()");
#endif
- bool aa = true;
-
- if((nsoption_bool(font_antialiasing) == false) || (palette_mapped == true))
- aa = false;
+ if(__builtin_expect(ami_nsfont == NULL, 0)) return false;
ami_plot_setapen(glob->rp, fstyle->foreground);
- ami_nsfont->text(glob->rp, text, length, fstyle, x, y, aa);
+ ami_nsfont->text(glob->rp, text, length, fstyle, x, y, nsoption_bool(font_antialiasing));
return true;
}