-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add font and font_description.
- Loading branch information
Showing
10 changed files
with
1,090 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 1999 Lars Knoll ([email protected]) | ||
* (C) 1999 Antti Koivisto ([email protected]) | ||
* (C) 2000 Dirk Mueller ([email protected]) | ||
* Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. | ||
* Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Library General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Library General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Library General Public License | ||
* along with this library; see the file COPYING.LIB. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301, USA. | ||
* | ||
*/ | ||
|
||
#include "font.h" | ||
|
||
namespace webf { | ||
|
||
Font::Font() = default; | ||
|
||
bool Font::operator==(const Font& other) const { | ||
return font_description_ == other.font_description_; | ||
} | ||
|
||
Font::Font(const FontDescription& fd) : font_description_(fd) {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (C) 2000 Lars Knoll ([email protected]) | ||
* (C) 2000 Antti Koivisto ([email protected]) | ||
* (C) 2000 Dirk Mueller ([email protected]) | ||
* Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | ||
* Copyright (C) 2008 Holger Hans Peter Freyther | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Library General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Library General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Library General Public License | ||
* along with this library; see the file COPYING.LIB. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301, USA. | ||
* | ||
*/ | ||
|
||
#ifndef WEBF_CORE_PLATFORM_FONTS_FONT_H_ | ||
#define WEBF_CORE_PLATFORM_FONTS_FONT_H_ | ||
|
||
#include "foundation/macros.h" | ||
#include "core/platform/fonts/font_description.h" | ||
|
||
namespace webf { | ||
|
||
class GCVisitor; | ||
|
||
class Font { | ||
WEBF_DISALLOW_NEW(); | ||
|
||
public: | ||
Font(); | ||
explicit Font(const FontDescription&); | ||
|
||
Font(const Font&) = default; | ||
Font(Font&&) = default; | ||
Font& operator=(const Font&) = default; | ||
Font& operator=(Font&&) = default; | ||
|
||
bool operator==(const Font& other) const; | ||
bool operator!=(const Font& other) const { return !(*this == other); } | ||
|
||
const FontDescription& GetFontDescription() const { | ||
return font_description_; | ||
} | ||
|
||
public: | ||
FontDescription font_description_; | ||
}; | ||
|
||
} | ||
|
||
#endif // WEBF_CORE_PLATFORM_FONTS_FONT_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (C) 2000 Lars Knoll ([email protected]) | ||
* (C) 2000 Antti Koivisto ([email protected]) | ||
* (C) 2000 Dirk Mueller ([email protected]) | ||
* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights | ||
* reserved. | ||
* Copyright (C) 2007 Nicholas Shanks <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Library General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Library General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Library General Public License | ||
* along with this library; see the file COPYING.LIB. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301, USA. | ||
* | ||
*/ | ||
|
||
#include "font_description.h" |
Oops, something went wrong.