bugGNU TeXmacs - Bugs: bug #37472, Big font size typesetting is broken

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #37472: Big font size typesetting is broken

Submitter:  Francois Poulain <fpoulain>
Submitted:  Sun 30 Sep 2012 12:18:25 PM UTC
   
 
Category:  Typesetter Priority:  3 - Low
Item Group:  Error Status:  Fixed
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release:  svn7190
Fixed Release:  None Fixed Release: 
Keywords: 

Jump to the original submission

Wed 01 Mar 2017 07:41:51 PM UTC, comment #7: 

The original problem is fixed and the issue in the last comment (Stix at size 300) does not crash texmacs any longer. I understand that there may remain some issues with wierd tex font sizes, nevertheless I think it's reasonable to close this.

Philippe Joyez <pjoyez>
Group Member
Tue 03 Dec 2013 12:42:28 PM UTC, comment #6: 

I agree with forgetting TeX's fonts problems.

Also, another problem occurs for big size. Try e.g. with a font styx of size 300 : TeXmacs crashes. I didn't investigated the problem, but it might be due to an int overflow.

So I reopen the bug, the crash should be avoided.

Francois Poulain <fpoulain>
Group Member
Tue 03 Dec 2013 11:11:35 AM UTC, comment #5: 

In the present state, there is not much that we can do about this bug, except hoping that people don't use strange font sizes.  In the feature, now that Max completed the native Pdf rendering engine, we should slowly move towards exclusive use of truetype and opentype fonts.  At a certain point, this bug should disappear automatically.

Joris van der Hoeven <vdhoeven>
Group administrator
Mon 28 Oct 2013 08:32:41 AM UTC, comment #4: 

arf ...

Francois Poulain <fpoulain>
Group Member
Sat 26 Oct 2013 09:56:20 PM UTC, comment #3: 

For certain LaTeX fonts, it is possible to have non integer font sizes, by multiplying the font size by 100.  For instance, larm10 would be equivalent to larm1000 and larm1050 would stand for a 10.5 point larm font.  One should be careful to fix bugs concerning font sizes >= 100 at the right place because of this...

Joris van der Hoeven <vdhoeven>
Group administrator
Sat 19 Oct 2013 12:54:00 PM UTC, comment #2: 

See the attached file fixbug37472.patch for a "solution". Joris should check this and see what can be done.

There are btw some occurrences of seemingly arbitrary values in the same file, like

int tt_size= size<333? size: (size+50)/100;


and a few more. They look a bit suspicious. What if I am editing some giant poster?

(file #29419)

Miguel de Benito <mdbenito>
Group Member
Thu 15 Aug 2013 01:07:50 PM UTC, comment #1: 

Inside Metafont/load_tex.cpp, try_tfm(), the following lines


if (size != osize)
    tfm->header[1]= mag (tfm->header[1], osize, size);


apply a factor to the second field in the tex font metrics header. This is the design_size, retrieved later for computation of the extents, among others. The code in this function is mysterious:


static int
mag (double dpi, double size, double dsize) {
  if ((size>=100) && (dsize<100)) dsize *= 100;
  if ((dsize>=100) && (size<100))  size *= 100;
  return (int) (((size * dpi) / dsize) + 0.5);
}


Bypassing the call to mag() at the function above the issue is solved:


if (size != osize)
    tfm->header[1]= (int) (((osize * tfm->header[1]) / size) + 0.5);


However I wonder what the purpose of such a computation might be. The function is used at several other places, so perhaps we ought to fix it instead of not use it?

Miguel de Benito <mdbenito>
Group Member
Sun 30 Sep 2012 12:18:25 PM UTC, original submission:  

This code works : <with|font-base-size|99|<TeXmacs>>
This code is badly rendered : <with|font-base-size|100|<TeXmacs>>
The horizontal shift between characters is bad when the font size go too big.

Francois Poulain <fpoulain>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #29419:  fixbug37472.patch added by mdbenito (634B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pjoyez (Posted a comment)
  • -email is unavailable- added by vdhoeven (Posted a comment)
  • -email is unavailable- added by mdbenito (Posted a comment)
  • -email is unavailable- added by fpoulain (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-01 pjoyez StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2013-12-03 fpoulain StatusPostponed Confirmed
    2013-12-03 vdhoeven Priority5 - Normal 3 - Low
        StatusIn Progress Postponed
    2013-11-29 vdhoeven Assigned tomdbenito vdhoeven
    2013-10-19 mdbenito Attached File- Added fixbug37472.patch, #29419
    2013-08-15 mdbenito Item GroupNone Error
        StatusNone In Progress
        Assigned toNone mdbenito
        Release svn7190

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code