~ubuntu-branches/ubuntu/raring/libcaca/raring

« back to all changes in this revision

Viewing changes to cucul/font.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2007-11-25 19:08:40 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071125190840-3r4k9nkxsyo7m3ck
Tags: 0.99.beta13b-1
* New upstream release.

* debian/control:
  + Do not build-depend on the whole texlive suite, but on more fine-grained
    packages. Thanks to Norbert Preining for the hints (latex -recorder, then
    inspect the .fls file).
* Ship libcaca++, libcucul++ and their development files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *  Copyright (c) 2002-2006 Sam Hocevar <sam@zoy.org>
4
4
 *                All Rights Reserved
5
5
 *
6
 
 *  $Id: font.c 1103 2006-12-12 01:53:54Z sam $
 
6
 *  $Id$
7
7
 *
8
8
 *  This library is free software. It comes without any warranty, to
9
9
 *  the extent permitted by applicable law. You can redistribute it
32
32
#include "cucul_internals.h"
33
33
 
34
34
/* Internal fonts */
35
 
#include "font_mono9.h"
36
 
#include "font_monobold12.h"
 
35
#include "mono9.data"
 
36
#include "monobold12.data"
37
37
 
38
38
/* Helper structures for font loading */
39
39
#if !defined(_DOXYGEN_SKIP_ME)
325
325
 *  \param f The font, as returned by cucul_load_font()
326
326
 *  \return The standard glyph width.
327
327
 */
328
 
unsigned int cucul_get_font_width(cucul_font_t *f)
 
328
unsigned int cucul_get_font_width(cucul_font_t const *f)
329
329
{
330
330
    return f->header.width;
331
331
}
340
340
 *  \param f The font, as returned by cucul_load_font()
341
341
 *  \return The standard glyph height.
342
342
 */
343
 
unsigned int cucul_get_font_height(cucul_font_t *f)
 
343
unsigned int cucul_get_font_height(cucul_font_t const *f)
344
344
{
345
345
    return f->header.height;
346
346
}
365
365
 *  \param f The font, as returned by cucul_load_font()
366
366
 *  \return The list of Unicode blocks supported by the font.
367
367
 */
368
 
unsigned long int const *cucul_get_font_blocks(cucul_font_t *f)
 
368
unsigned long int const *cucul_get_font_blocks(cucul_font_t const *f)
369
369
{
370
370
    return (unsigned long int const *)f->user_block_list;
371
371
}
415
415
 *  \param pitch The pitch (in bytes) of an image buffer line.
416
416
 *  \return This function always returns 0.
417
417
 */
418
 
int cucul_render_canvas(cucul_canvas_t *cv, cucul_font_t *f,
 
418
int cucul_render_canvas(cucul_canvas_t const *cv, cucul_font_t const *f,
419
419
                        void *buf, unsigned int width,
420
420
                        unsigned int height, unsigned int pitch)
421
421
{
467
467
            g = &f->glyph_list[f->block_list[b].index
468
468
                                + ch - f->block_list[b].start];
469
469
 
470
 
            _cucul_attr_to_argb4(attr, argb);
 
470
            cucul_attr_to_argb64(attr, argb);
471
471
 
472
472
            /* Step 1: unpack glyph */
473
473
            switch(f->header.bpp)