File indexing completed on 2024-05-12 04:33:59

0001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; c-brace-offset: 0; -*-
0002 
0003 #ifndef _TEXFONT_PK_H
0004 #define _TEXFONT_PK_H
0005 
0006 #include "TeXFont.h"
0007 
0008 class glyph;
0009 
0010 class TeXFont_PK : public TeXFont
0011 {
0012 public:
0013     explicit TeXFont_PK(TeXFontDefinition *parent);
0014     ~TeXFont_PK() override;
0015 
0016     glyph *getGlyph(quint16 character, bool generateCharacterPixmap = false, const QColor &color = Qt::black) override;
0017 
0018 private:
0019     // open font file or NULL
0020     FILE *file;
0021 
0022     struct bitmap *characterBitmaps[TeXFontDefinition::max_num_of_chars_in_font];
0023 
0024     // For use by PK-decryption routines. I don't understand what these
0025     // are good for -- Stefan Kebekus
0026     int PK_flag_byte;
0027     unsigned int PK_input_byte;
0028     int PK_bitpos;
0029     int PK_dyn_f;
0030     int PK_repeat_count;
0031 
0032     // PK-internal routines which were taken from xdvi. Again, I do not
0033     // really know what they are good for -- Stefan Kebekus
0034     inline void read_PK_char(unsigned int ch);
0035     inline int PK_get_nyb(FILE *fp);
0036     inline int PK_packed_num(FILE *fp);
0037     inline void read_PK_index();
0038     inline void PK_skip_specials();
0039 };
0040 
0041 #endif