Make Y DPI a configurable option. Default is 72 (AmigaOS standard)

svn path=/trunk/netsurf/; revision=12237
This commit is contained in:
Chris Young 2011-04-25 17:43:22 +00:00
parent 45778bbb36
commit 06213b4dd2
4 changed files with 9 additions and 4 deletions

View File

@ -44,6 +44,7 @@ There are a couple of Amiga-specific options which can only be changed directly
@{b}printer_unit@{ub} Specifies which printer.device unit to print to
@{b}drag_save_icons@{ub} Enables displaying Workbench-style transparent icons under the pointer when performing drag saves (ctrl-drag of objects available if NetSurf is running on the Workbench screen) and text selection drags. If set to 0 the pointer style will change instead. OS 4.0 users may want to set this to 0 as icons will appear opaque and obscure the drop position.
@{b}cairo_renderer@{ub} Set rendering engine (SObjs version only). 0 = graphics.library, 1 = Cairo/graphics.library mixed (recommended), 2 = Full Cairo.
@{b}amiga_ydpi@{ub} Set vertical screen resolution in DPI (horizontal resolution is calculated automatically). To find the correct value, divide the number of pixels on the screen vertically by the physical height of the screen in inches. Default = 72
@{b}url_file@{ub} Path to URL database file
@{b}hotlist_file@{ub} Path to Hotlist file

View File

@ -623,8 +623,10 @@ void ami_font_setdevicedpi(int id)
DisplayInfoHandle dih;
struct DisplayInfo dinfo;
Point dinfo_res;
ULONG ydpi = FIXTOINT(nscss_screen_dpi);
ULONG xdpi = ydpi;
ULONG ydpi = option_amiga_ydpi;
ULONG xdpi = option_amiga_ydpi;
nscss_screen_dpi = INTTOFIX(option_amiga_ydpi);
if(id)
{

View File

@ -476,7 +476,6 @@ void gui_init(int argc, char** argv)
quirks_stylesheet_url = "file:///PROGDIR:Resources/quirks.css";
adblock_stylesheet_url = "file:///PROGDIR:Resources/adblock.css";
nscss_screen_dpi = INTTOFIX(72);
ami_font_setdevicedpi(0); /* for early font requests, eg treeview init */
scroll_widget_fg_colour = 0x00aaaaaa;

View File

@ -65,6 +65,7 @@ extern int option_cookies_window_xsize;
extern int option_cookies_window_ysize;
extern int option_cairo_renderer;
extern bool option_direct_render;
extern int option_amiga_ydpi;
#define EXTRA_OPTION_DEFINE \
char *option_url_file = 0; \
@ -112,6 +113,7 @@ int option_cookies_window_xsize = 0; \
int option_cookies_window_ysize = 0; \
int option_cairo_renderer = 1; \
bool option_direct_render = false; \
int option_amiga_ydpi = 72; \
#define EXTRA_OPTION_TABLE \
{ "url_file", OPTION_STRING, &option_url_file }, \
@ -158,5 +160,6 @@ bool option_direct_render = false; \
{ "cookies_window_xsize", OPTION_INTEGER, &option_cookies_window_xsize}, \
{ "cookies_window_ysize", OPTION_INTEGER, &option_cookies_window_ysize}, \
{ "cairo_renderer", OPTION_INTEGER, &option_cairo_renderer}, \
{ "direct_render", OPTION_BOOL, &option_direct_render},
{ "direct_render", OPTION_BOOL, &option_direct_render}, \
{ "amiga_ydpi", OPTION_INTEGER, &option_amiga_ydpi},
#endif