diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-04-22 16:06:46 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-04-22 16:06:46 +0000 |
commit | 83914b9c3e87e3db536ee494ce0032cdb5e5d781 (patch) | |
tree | d1679576b3c698d550c59b850450e940aed53b20 /amiga/font.c | |
parent | b14edfdd5a20c4504e7893c541832f41402eaf09 (diff) | |
download | netsurf-83914b9c3e87e3db536ee494ce0032cdb5e5d781.tar.gz netsurf-83914b9c3e87e3db536ee494ce0032cdb5e5d781.tar.bz2 |
Set font DPI from nscss_screen_dpi to ensure it is always in sync
Reset font DPI when opening screens to allow us to correct for aspect ratio in the
future
svn path=/trunk/netsurf/; revision=12229
Diffstat (limited to 'amiga/font.c')
-rw-r--r-- | amiga/font.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/amiga/font.c b/amiga/font.c index 78237cdab..d40726440 100644 --- a/amiga/font.c +++ b/amiga/font.c @@ -40,6 +40,11 @@ #define NSA_UNICODE_FONT PLOT_FONT_FAMILY_COUNT +#define NSA_NORMAL 0 +#define NSA_ITALIC 1 +#define NSA_BOLD 2 +#define NSA_BOLDITALIC 3 + #define NSA_VALUE_BOLDX (1 << 12) #define NSA_VALUE_BOLDY (1 << 12) #define NSA_VALUE_SHEARSIN (1 << 14) @@ -50,6 +55,8 @@ static struct OutlineFont *ofb[PLOT_FONT_FAMILY_COUNT+1]; static struct OutlineFont *ofi[PLOT_FONT_FAMILY_COUNT+1]; static struct OutlineFont *ofbi[PLOT_FONT_FAMILY_COUNT+1]; +ULONG ami_devicedpi; + int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp, uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth); struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle, BOOL fallback); @@ -367,7 +374,7 @@ struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle, BOOL ysize = fstyle->size * ((1 << 16) / FONT_SIZE_SCALE); if(ESetInfo(&ofont->olf_EEngine, - OT_DeviceDPI, (72<<16) | 72, + OT_DeviceDPI, ami_devicedpi, OT_PointHeight, ysize, OT_EmboldenX, emboldenx, OT_EmboldenY, emboldeny, @@ -605,3 +612,10 @@ void ami_close_fonts(void) if(ofbi[i]) CloseOutlineFont(ofbi[i],NULL); } } + +ULONG ami_font_setdevicedpi(int dpi) +{ + ami_devicedpi = (dpi<<16) | dpi; + + return ami_devicedpi; +} |