diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-04-16 15:56:48 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-04-16 15:56:48 +0100 |
commit | 3c61db33ffc94ee194dd0111a332762199334d37 (patch) | |
tree | dc321eb5f1e94974a62009abb36cd3111256ed70 /atari/plot/font_freetype.c | |
parent | ad18ef5db99eb38075e6e49246b097a8ba727ab8 (diff) | |
download | netsurf-3c61db33ffc94ee194dd0111a332762199334d37.tar.gz netsurf-3c61db33ffc94ee194dd0111a332762199334d37.tar.bz2 |
Convert atari frontend to use bitmap operation table
Diffstat (limited to 'atari/plot/font_freetype.c')
-rwxr-xr-x | atari/plot/font_freetype.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c index b88505d19..c4d774831 100755 --- a/atari/plot/font_freetype.c +++ b/atari/plot/font_freetype.c @@ -94,23 +94,23 @@ fantasy.ttf => Fantasy #define CACHE_MIN_SIZE (100 * 1024) #define BOLD_WEIGHT 700 -extern unsigned long atari_plot_flags;
-extern int atari_plot_vdi_handle;
-
-static FT_Library library;
-static FTC_Manager ft_cmanager;
-static FTC_CMapCache ft_cmap_cache ;
-static FTC_ImageCache ft_image_cache;
-
-int ft_load_type;
-
-/* cache manager faceID data to create freetype faceid on demand */
-typedef struct ftc_faceid_s {
- char *fontfile; /* path to font */
- int index; /* index of font */
- int cidx; /* character map index for unicode */
-} ftc_faceid_t;
-
+extern unsigned long atari_plot_flags; +extern int atari_plot_vdi_handle; + +static FT_Library library; +static FTC_Manager ft_cmanager; +static FTC_CMapCache ft_cmap_cache ; +static FTC_ImageCache ft_image_cache; + +int ft_load_type; + +/* cache manager faceID data to create freetype faceid on demand */ +typedef struct ftc_faceid_s { + char *fontfile; /* path to font */ + int index; /* index of font */ + int cidx; /* character map index for unicode */ +} ftc_faceid_t; + static int dtor( FONT_PLOTTER self );
static int str_width( FONT_PLOTTER self,const plot_font_style_t *fstyle,
const char * str, size_t length, int * width );
@@ -608,10 +608,10 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng #ifdef WITH_8BPP_SUPPORT
if( app.nplanes > 8 ){
#endif
- RGB1000 out;
+ RGB1000 out; /* struct with RGB shorts */ rgb_to_vdi1000( (unsigned char*)&c, &out);
vs_color(atari_plot_vdi_handle, OFFSET_CUSTOM_COLOR, - (unsigned short*)&out);
+ (short*)&out);
#ifdef WITH_8BPP_SUPPORT
} else {
c = RGB_TO_VDI(c);
@@ -625,10 +625,10 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng clip.g_w = (clipping.x1 - clipping.x0)+1;
clip.g_h = (clipping.y1 - clipping.y0)+1;
- fontbmp = bitmap_realloc( clip.g_w, clip.g_h,
+ fontbmp = atari_bitmap_realloc( clip.g_w, clip.g_h,
4, clip.g_w << 2,
BITMAP_GROW, fontbmp );
- fontbmp_stride = bitmap_get_rowstride(fontbmp);
+ fontbmp_stride = atari_bitmap_get_rowstride(fontbmp);
fontbmp_allocated_height = clip.g_h;
fontbmp_allocated_width = clip.g_w;
@@ -684,7 +684,7 @@ int ctor_font_plotter_freetype( FONT_PLOTTER self ) LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
if( !init ) {
ft_font_init();
- fontbmp = bitmap_create(48, 48, 0);
+ fontbmp = atari_bitmap_create(48, 48, 0);
fontbmp->opaque = false;
init = true;
}
@@ -696,7 +696,7 @@ static int dtor( FONT_PLOTTER self ) {
ft_font_finalise();
if( fontbmp != NULL ) {
- bitmap_destroy( fontbmp );
+ atari_bitmap_destroy( fontbmp );
fontbmp = NULL;
}
if( tmp.fd_addr != NULL ){
|