mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
...
This commit is contained in:
parent
7d1c706835
commit
83175da4b2
@ -136,13 +136,9 @@ Fonts::size_type Fonts::add_font(XMLFont *f) {
|
|||||||
|
|
||||||
Fonts::size_type Fonts::add_font(string* font_name, double size, GfxRGB rgb) {
|
Fonts::size_type Fonts::add_font(string* font_name, double size, GfxRGB rgb) {
|
||||||
XMLFont *f = NULL;
|
XMLFont *f = NULL;
|
||||||
if (font_name == NULL) {
|
if (font_name == NULL)
|
||||||
string *fn = new string("Unknown");
|
font_name = new string("Unknown");
|
||||||
f = new XMLFont(fn, size, rgb);
|
f = new XMLFont(font_name, size, rgb);
|
||||||
// fn must not be deleted
|
|
||||||
} else {
|
|
||||||
f = new XMLFont(font_name, size, rgb);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this->add_font(f);
|
return this->add_font(f);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user