[go: up one dir, main page]

File: fontlib_wrapper.h

package info (click to toggle)
coin3 3.1.3-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 48,344 kB
  • ctags: 70,042
  • sloc: cpp: 314,328; ansic: 15,927; sh: 13,635; makefile: 8,780; perl: 2,149; lex: 1,302; lisp: 1,247; yacc: 184; xml: 175; sed: 68
file content (83 lines) | stat: -rw-r--r-- 3,050 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef COIN_FLW_H
#define COIN_FLW_H

/**************************************************************************\
 *
 *  This file is part of the Coin 3D visualization library.
 *  Copyright (C) by Kongsberg Oil & Gas Technologies.
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  ("GPL") version 2 as published by the Free Software Foundation.
 *  See the file LICENSE.GPL at the root directory of this source
 *  distribution for additional information about the GNU GPL.
 *
 *  For using Coin with software that can not be combined with the GNU
 *  GPL, and for taking advantage of the additional benefits of our
 *  support services, please contact Kongsberg Oil & Gas Technologies
 *  about acquiring a Coin Professional Edition License.
 *
 *  See http://www.coin3d.org/ for more information.
 *
 *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
 *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
 *
\**************************************************************************/

/*
  FLW is a Font Library Wrapper abstraction designed to allow any
  number of underlying font libraries to be used through the same API.

  Functions and datatypes are loosely modeled on the FreeType font
  library.

  Which underlying font library to use is currently determined at
  compile time.
*/

/* ********************************************************************** */

#ifndef COIN_INTERNAL
#error this is a private header file
#endif /* ! COIN_INTERNAL */

/* ********************************************************************** */

#include <Inventor/C/tidbits.h>
#include <Inventor/C/base/string.h>
#include <Inventor/C/base/list.h>
#include "fontspec.h"

#include "common.h"

#ifdef __cplusplus
extern "C" {
#endif

  void cc_flw_ref_font(int fontid);
  void cc_flw_unref_font(int fontid);

  int cc_flw_get_font_id(const char * fontname, const unsigned int sizey,
                         const float angle, const float complexity);

  unsigned int cc_flw_get_glyph(int font, unsigned int charidx);
  void cc_flw_done_glyph(int font, unsigned int glyphidx);

  struct cc_font_bitmap * cc_flw_get_bitmap(int font, unsigned int glyph);
  struct cc_font_vector_glyph * cc_flw_get_vector_glyph(int font, unsigned int glyph);

  const float * cc_flw_get_vector_glyph_coords(struct cc_font_vector_glyph * vecglyph);
  const int * cc_flw_get_vector_glyph_faceidx(struct cc_font_vector_glyph * vecglyph);
  const int * cc_flw_get_vector_glyph_edgeidx(struct cc_font_vector_glyph * vecglyph);

  void cc_flw_get_bitmap_advance(int font, unsigned int glyph, int * x, int * y);
  void cc_flw_get_bitmap_kerning(int font, unsigned int glyph1, unsigned int glyph2, int * x, int * y);

  void cc_flw_get_vector_advance(int font, unsigned int glyph, float * x, float * y);
  void cc_flw_get_vector_kerning(int font, unsigned int glyph1, unsigned int glyph2, float * x, float * y);

#ifdef __cplusplus
}
#endif

#endif /* !COIN_FLW_H */