1 |
/***************************************************************************** |
/****************************************************************************** |
2 |
* |
* * |
3 |
* XVID MPEG-4 VIDEO CODEC |
* This file is part of XviD, a free MPEG-4 video encoder/decoder * |
4 |
* - font module |
* * |
5 |
* |
* XviD is free software; you can redistribute it and/or modify it * |
6 |
* Copyright(C) 2002 Peter Ross <pross@xvid.org> |
* under the terms of the GNU General Public License as published by * |
7 |
* |
* the Free Software Foundation; either version 2 of the License, or * |
8 |
* This program is an implementation of a part of one or more MPEG-4 |
* (at your option) any later version. * |
9 |
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
* * |
10 |
* to use this software module in hardware or software products are |
* XviD is distributed in the hope that it will be useful, but * |
11 |
* advised that its use may infringe existing patents or copyrights, and |
* WITHOUT ANY WARRANTY; without even the implied warranty of * |
12 |
* any such use would be at such party's own risk. The original |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
13 |
* developer of this software module and his/her company, and subsequent |
* GNU General Public License for more details. * |
14 |
* editors and their companies, will have no liability for use of this |
* * |
15 |
* software or modifications or derivatives thereof. |
* You should have received a copy of the GNU General Public License * |
16 |
* |
* along with this program; if not, write to the Free Software * |
17 |
* This program is free software; you can redistribute it and/or modify |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * |
18 |
* it under the terms of the GNU General Public License as published by |
* * |
19 |
* the Free Software Foundation; either version 2 of the License, or |
******************************************************************************/ |
20 |
* (at your option) any later version. |
|
21 |
* |
/****************************************************************************** |
22 |
* This program is distributed in the hope that it will be useful, |
* * |
23 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* font.c * |
24 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
* * |
25 |
* GNU General Public License for more details. |
* Copyright (C) 2001 - Peter Ross <suxen_drol@hotmail.com> * |
26 |
* |
* * |
27 |
* You should have received a copy of the GNU General Public License |
* For more information visit the XviD homepage: http://www.xvid.org * |
28 |
* along with this program; if not, write to the Free Software |
* * |
29 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
******************************************************************************/ |
30 |
* |
|
31 |
****************************************************************************/ |
/****************************************************************************** |
32 |
|
* * |
33 |
|
* Revision history: * |
34 |
|
* * |
35 |
|
* 22.06.2002 inital version * |
36 |
|
* * |
37 |
|
******************************************************************************/ |
38 |
|
|
39 |
|
#include <stdio.h> |
40 |
|
#include <stdarg.h> |
41 |
|
|
42 |
#include "image.h" |
#include "image.h" |
43 |
#include "font.h" |
#include "font.h" |
481 |
0,0,1,0, |
0,0,1,0, |
482 |
0,0,1,0, |
0,0,1,0, |
483 |
0,0,1,0, |
0,0,1,0, |
484 |
0,1,1,0, |
0,0,1,0, |
485 |
|
0,1,1,0 }, |
486 |
|
|
|
0,0,1,0 }, |
|
487 |
{ 0,1,0,1, // ^ |
{ 0,1,0,1, // ^ |
488 |
0,0,0,0, |
0,0,0,0, |
489 |
0,0,0,0, |
0,0,0,0, |
534 |
{ |
{ |
535 |
va_list args; |
va_list args; |
536 |
char buf[FONT_BUF_SZ]; |
char buf[FONT_BUF_SZ]; |
537 |
size_t i; |
int i; |
538 |
|
|
539 |
va_start(args, fmt); |
va_start(args, fmt); |
540 |
vsprintf(buf, fmt, args); |
vsprintf(buf, fmt, args); |
541 |
|
|
542 |
for (i = 0; i < strlen(buf); i++) { |
for (i = 0; i < buf[i]; i++) { |
543 |
const char * font; |
const char * font; |
544 |
|
|
545 |
if (buf[i] >= '!' && buf[i] <= '@') |
if (buf[i] >= '!' && buf[i] <= '@') |