mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-01 07:00:55 +00:00
This patch reorganizes the terminal's source code to become easier to extend. It also enables the strict warning level.
48 lines
917 B
C++
48 lines
917 B
C++
/*
|
|
* \brief Terminal font handling
|
|
* \author Norman Feske
|
|
* \date 2018-02-06
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2018 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
#ifndef _FONT_FAMILY_H_
|
|
#define _FONT_FAMILY_H_
|
|
|
|
/* local includes */
|
|
#include "types.h"
|
|
|
|
namespace Terminal {
|
|
typedef Text_painter::Font Font;
|
|
class Font_family;
|
|
}
|
|
|
|
|
|
class Terminal::Font_family
|
|
{
|
|
private:
|
|
|
|
Font const &_regular;
|
|
|
|
public:
|
|
|
|
Font_family(Font const ®ular) : _regular(regular) { }
|
|
|
|
/**
|
|
* Return font for specified face
|
|
*
|
|
* For now, we do not support font faces other than regular.
|
|
*/
|
|
Font const &font(Font_face) const { return _regular; }
|
|
|
|
unsigned cell_width() const { return _regular.str_w("m"); }
|
|
unsigned cell_height() const { return _regular.str_h("m"); }
|
|
};
|
|
|
|
#endif /* _FONT_FAMILY_H_ */
|