X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fdvi%2Fmdvi-lib%2Ffont.c;h=2f655df0b70b7684fa91d8eaa0bbdc1fb587ed93;hb=11eb3f2a9d6062b2d38a549c1f9547d7985c7be5;hp=fedb7e78a595a580d8257c77f56971ce9f541d5f;hpb=13a06349251874bd35d2f03c3fc93217cee749a2;p=evince.git diff --git a/backend/dvi/mdvi-lib/font.c b/backend/dvi/mdvi-lib/font.c index fedb7e78..2f655df0 100644 --- a/backend/dvi/mdvi-lib/font.c +++ b/backend/dvi/mdvi-lib/font.c @@ -13,9 +13,10 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include #include #include "mdvi.h" @@ -35,7 +36,7 @@ int font_reopen(DviFont *font) { if(font->in) fseek(font->in, (long)0, SEEK_SET); - else if((font->in = fopen(font->filename, "r")) == NULL) { + else if((font->in = fopen(font->filename, "rb")) == NULL) { DEBUG((DBG_FILES, "reopen(%s) -> Error\n", font->filename)); return -1; } @@ -378,10 +379,12 @@ again: return ch; } else if(MDVI_ENABLED(dvi, MDVI_PARAM_ANTIALIASED)) { if(ch->grey.data && + !MDVI_GLYPH_ISEMPTY(ch->grey.data) && ch->fg == dvi->curr_fg && ch->bg == dvi->curr_bg) return ch; - if(ch->grey.data) { + if(ch->grey.data && + !MDVI_GLYPH_ISEMPTY(ch->grey.data)) { if(dvi->device.free_image) dvi->device.free_image(ch->grey.data); ch->grey.data = NULL; @@ -468,7 +471,7 @@ void font_finish_definitions(DviContext *dvi) font_free_unused(&dvi->device); if(dvi->fonts == NULL) { - warning(_("%s: no fonts defined\n"), dvi->filename); + mdvi_warning(_("%s: no fonts defined\n"), dvi->filename); return; } map = xnalloc(DviFontRef *, dvi->nfonts);