Example #1
0
/**
 * Put a character at the given coordinates
 * @param lig the line
 * @param col the column
 * @param c the character to draw
 * @param cf the background color
 * @param ct the text color
 * @param cl the blinking flag
 */
void putc_at(uint32_t lig, uint32_t col, char c, uint16_t ct, uint16_t cf)
{
	term[lig*COL+col] = c;
	Render_Glyph(&Font16_Table[(c-' ')*font_px_h*font_tb_offset],
					font_tb_offset, font_px_h,
					col*font_px_w, lig*font_px_h,
					ct, cf);
}
Example #2
0
  static FT_Error
  Render_All( int  first_glyph,
              int  pt_size )
  {
    FT_F26Dot6  start_x, start_y, step_y, x, y;
    int         i;


    start_x = 4;
    start_y = 36 + pt_size;

    step_y = size->metrics.y_ppem + 10;

    x = start_x;
    y = start_y;

    i = first_glyph;

#if 0
     while ( i < first_glyph + 1 )
#else
     while ( i < num_glyphs )
#endif
    {
      if ( !( error = LoadChar( i, hinted ) ) )
      {
#ifdef DEBUG
        if ( i <= first_glyph + 6 )
        {
          LOG(( "metrics[%02d] = [%x %x]\n",
                i,
                glyph->metrics.horiBearingX,
                glyph->metrics.horiAdvance ));

          if ( i == first_glyph + 6 )
            LOG(( "-------------------------\n" ));
        }
#endif

        Render_Glyph( x, y );

        x += ( glyph->metrics.horiAdvance >> 6 ) + 1;

        if ( x + size->metrics.x_ppem > bit.width )
        {
          x  = start_x;
          y += step_y;

          if ( y >= bit.rows )
            return FT_Err_Ok;
        }
      }
      else
        Fail++;

      i++;
    }
Example #3
0
/**
 * redessine l'écran suivant le contenu du buffer term
 */
void render_screen(void)
{
	for (int i = 0; i < LIN; i++)
	{
		for (int j = 0; j < COL; j++)
		{
			Render_Glyph(&Font16_Table[(term[i*COL+j]-' ')*font_px_h*font_tb_offset],
					font_tb_offset, font_px_h,
					j*font_px_w, i*font_px_h,
					ct, cf);
		}
	}
}