mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -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) {
|
||||
XMLFont *f = NULL;
|
||||
if (font_name == NULL) {
|
||||
string *fn = new string("Unknown");
|
||||
f = new XMLFont(fn, size, rgb);
|
||||
// fn must not be deleted
|
||||
} else {
|
||||
f = new XMLFont(font_name, size, rgb);
|
||||
}
|
||||
if (font_name == NULL)
|
||||
font_name = new string("Unknown");
|
||||
f = new XMLFont(font_name, size, rgb);
|
||||
|
||||
return this->add_font(f);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user