1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ex: set tabstop=8 softtabstop=2 shiftwidth=2 expandtab: */
3
/* ***** BEGIN LICENSE BLOCK *****
4
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
6
* The contents of this file are subject to the Netscape Public License
7
* Version 1.1 (the "License"); you may not use this file except in
8
* compliance with the License. You may obtain a copy of the License at
9
* http://www.mozilla.org/NPL/
11
* Software distributed under the License is distributed on an "AS IS" basis,
12
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13
* for the specific language governing rights and limitations under the
16
* The Original Code is mozilla.org code.
18
* The Initial Developer of the Original Code is
19
* Netscape Communications Corporation.
20
* Portions created by the Initial Developer are Copyright (C) 1998
21
* the Initial Developer. All Rights Reserved.
24
* Brian Stell <bstell@netscape.com>
25
* Louie Zhao <louie.zhao@sun.com>
27
* Alternatively, the contents of this file may be used under the terms of
28
* either the GNU General Public License Version 2 or later (the "GPL"), or
29
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30
* in which case the provisions of the GPL or the LGPL are applicable instead
31
* of those above. If you wish to allow use of your version of this file only
32
* under the terms of either the GPL or the LGPL, and not to allow others to
33
* use your version of this file under the terms of the NPL, indicate your
34
* decision by deleting the provisions above and replace them with the notice
35
* and other provisions required by the GPL or the LGPL. If you do not delete
36
* the provisions above, a recipient may use your version of this file under
37
* the terms of any one of the NPL, the GPL or the LGPL.
39
* ***** END LICENSE BLOCK ***** */
40
#ifndef nsFontDebug_h__
41
#define nsFontDebug_h__
43
#define NS_FONT_DEBUG_LOAD_FONT 0x01
44
#define NS_FONT_DEBUG_CALL_TRACE 0x02
45
#define NS_FONT_DEBUG_FIND_FONT 0x04
46
#define NS_FONT_DEBUG_SIZE_FONT 0x08
47
#define NS_FONT_DEBUG_SCALED_FONT 0x10
48
#define NS_FONT_DEBUG_BANNED_FONT 0x20
49
#define NS_FONT_DEBUG_FONT_CATALOG 0x100
50
#define NS_FONT_DEBUG_FONT_SCAN 0x200
51
#define NS_FONT_DEBUG_FREETYPE_FONT 0x400
52
#define NS_FONT_DEBUG_FREETYPE_GRAPHICS 0x800
55
#define NS_FONT_DEBUG 1
58
# define DEBUG_PRINTF(x) \
59
DEBUG_PRINTF_MACRO(x, 0xFFFF)
61
# define DEBUG_PRINTF_MACRO(x, type) \
63
if (gFontDebug & (type)) { \
65
printf(", %s %d\n", __FILE__, __LINE__); \
69
# define DEBUG_PRINTF_MACRO(x, type) \
74
#define FIND_FONT_PRINTF(x) \
75
DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FIND_FONT)
77
#define SIZE_FONT_PRINTF(x) \
78
DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_SIZE_FONT)
80
#define SCALED_FONT_PRINTF(x) \
81
DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_SCALED_FONT)
83
#define BANNED_FONT_PRINTF(x) \
84
DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_BANNED_FONT)
86
#define FONT_CATALOG_PRINTF(x) \
87
DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FONT_CATALOG)
89
#define FONT_SCAN_PRINTF(x) \
91
if (gFontDebug & NS_FONT_DEBUG_FONT_SCAN) { \
97
#define FREETYPE_FONT_PRINTF(x) \
98
DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FREETYPE_FONT)
100
extern PRUint32 gFontDebug;