mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-22 18:32:16 +03:00
Don't use a designed font for oblique, only italic.
svn path=/trunk/netsurf/; revision=13226
This commit is contained in:
parent
0ce6fc409c
commit
a06678dabf
30
amiga/font.c
30
amiga/font.c
@ -52,6 +52,8 @@
|
||||
#define NSA_ITALIC 1
|
||||
#define NSA_BOLD 2
|
||||
#define NSA_BOLDITALIC 3
|
||||
#define NSA_OBLIQUE 4
|
||||
#define NSA_BOLDOBLIQUE 6
|
||||
|
||||
#define NSA_VALUE_BOLDX (1 << 12)
|
||||
#define NSA_VALUE_BOLDY 0
|
||||
@ -419,8 +421,11 @@ struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle, BOOL
|
||||
node = ami_font_open(fontname);
|
||||
if(!node) return NULL;
|
||||
|
||||
if ((fstyle->flags & FONTF_ITALIC) || (fstyle->flags & FONTF_OBLIQUE))
|
||||
tstyle += NSA_ITALIC;
|
||||
if (fstyle->flags & FONTF_OBLIQUE)
|
||||
tstyle = NSA_OBLIQUE;
|
||||
|
||||
if (fstyle->flags & FONTF_ITALIC)
|
||||
tstyle = NSA_ITALIC;
|
||||
|
||||
if (fstyle->weight >= 700)
|
||||
tstyle += NSA_BOLD;
|
||||
@ -440,6 +445,11 @@ struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle, BOOL
|
||||
}
|
||||
break;
|
||||
|
||||
case NSA_OBLIQUE:
|
||||
shearsin = NSA_VALUE_SHEARSIN;
|
||||
shearcos = NSA_VALUE_SHEARCOS;
|
||||
break;
|
||||
|
||||
case NSA_BOLD:
|
||||
if(node->bold)
|
||||
{
|
||||
@ -453,6 +463,22 @@ struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle, BOOL
|
||||
}
|
||||
break;
|
||||
|
||||
case NSA_BOLDOBLIQUE:
|
||||
shearsin = NSA_VALUE_SHEARSIN;
|
||||
shearcos = NSA_VALUE_SHEARCOS;
|
||||
|
||||
if(node->bold)
|
||||
{
|
||||
node = ami_font_open(node->bold);
|
||||
if(!node) return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
emboldenx = NSA_VALUE_BOLDX;
|
||||
emboldeny = NSA_VALUE_BOLDY;
|
||||
}
|
||||
break;
|
||||
|
||||
case NSA_BOLDITALIC:
|
||||
if(node->bolditalic)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user