Back to index

texmacs  1.0.7.15
Defines | Functions
glyph.cpp File Reference
#include "bitmap_font.hpp"

Go to the source code of this file.

Defines

#define PIXEL   256

Functions

tm_ostreamoperator<< (tm_ostream &out, glyph gl)

Define Documentation

#define PIXEL   256

Definition at line 14 of file glyph.cpp.


Function Documentation

tm_ostream& operator<< ( tm_ostream out,
glyph  gl 
)

Definition at line 104 of file glyph.cpp.

                                        {
  int i, j;
  out << "Size  : (" << gl->width << ", " << gl->height << ")\n";
  out << "Offset: (" << gl->xoff << ", " << gl->yoff << ")\n";
  for (i=0; i<gl->width+2; i++) out << "-";
  out << "\n";
  for (j=0; j<gl->height; j++) {
    out << "|";
    for (i=0; i<gl->width; i++) {
      int k= gl->get_x (i, j);
      if (k==0) out << " ";
      else if (gl->depth==1) out << "*";
      else if (k <= 9) out << k;
      else out << ((char) (55+k));
    }
    out << "|\n";
  }
  for (i=0; i<gl->width+2; i++) out << "-";
  out << "\n";
  return out;
}