File indexing completed on 2024-05-12 16:06:38
0001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; c-brace-offset: 0; -*- 0002 0003 #ifndef _GLYPH_H 0004 #define _GLYPH_H 0005 0006 #include <QColor> 0007 #include <QImage> 0008 0009 struct bitmap { 0010 bitmap(); 0011 ~bitmap(); 0012 0013 bitmap(const bitmap &) = delete; 0014 bitmap &operator=(const bitmap &) = delete; 0015 0016 // width and height in pixels 0017 quint16 w, h; 0018 // scan-line width in bytes 0019 quint16 bytes_wide; 0020 // pointer to the bits 0021 char *bits; 0022 }; 0023 0024 class glyph 0025 { 0026 public: 0027 glyph(); 0028 ~glyph(); 0029 0030 // address of bitmap in font file 0031 long addr; 0032 0033 QColor color; 0034 0035 // DVI units to move reference point 0036 qint32 dvi_advance_in_units_of_design_size_by_2e20; 0037 0038 // x and y offset in pixels 0039 short x, y; 0040 0041 QImage shrunkenCharacter; 0042 0043 // x and y offset in pixels (shrunken bitmap) 0044 short x2, y2; 0045 }; 0046 0047 #endif // ifndef _GLYPH_H