commit 755dee630cebe5610e5200ebc42c3789d41dd3a4
parent 36853a4166145f9724a6c6b88f67f6bc97a2e23d
Author: Kyle Milz <krwmilz@gmail.com>
Date: Sun, 12 Mar 2023 22:54:33 +0000
unwrap a line and remove space indents
Diffstat:
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dvi-init.c b/dvi-init.c
@@ -405,13 +405,14 @@ define_font(FILE *file, unsigned char cmnd, struct font *vfparent,
* reuse font if possible
*/
for (fontp = font_head; fontp != NULL; fontp = fontp->next) {
- if (strcmp(n, fontp->fontname) == 0 &&
- size == (int) (fontp->fsize + 0.5)) {
- /* if font already in use */
- reuse_font(fontp);
- free(n);
- break;
- }
+ if (strcmp(n, fontp->fontname) != 0 ||
+ size != (int) (fontp->fsize + 0.5))
+ continue;
+
+ /* font already in use */
+ reuse_font(fontp);
+ free(n);
+ break;
}
if (fontp == NULL) {
@@ -432,8 +433,7 @@ define_font(FILE *file, unsigned char cmnd, struct font *vfparent,
/* spsize = scaled size of the font in spell units,
* = scale * [vfparent->]dimconv.
*/
- fontp->spsize =
- (vfparent != NULL ? vfparent->dimconv : dimconv) * s;
+ fontp->spsize = (vfparent != NULL ? vfparent->dimconv : dimconv) * s;
if (vfparent == NULL)
if (!load_font(fontp)) {
if (ev_flags & EV_GE_NEWDOC) {
@@ -443,7 +443,7 @@ define_font(FILE *file, unsigned char cmnd, struct font *vfparent,
return NULL;
}
font_not_found = True;
- }
+ }
fontp->next = font_head;
font_head = fontp;
}