Announcement

Collapse
No announcement yet.

Font size error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Font size error

    Hi,

    In the "Batch conversion dialog", select "Use advanced options" and click the "Advanced" button.
    Then in the "Batch conversion settings" dialog check "Add overlay text" and click the "Settings" button.
    Now, in the "Add overlay text to image" dialog, click the "Choose Font" button, select a font and a size (e.g. Arial 14 pt bold) and confirm.
    The size reported in the "Add overlay text to image" dialog is not the one that was selected. For example:
    12 pt becomes 15 pt
    14 pt becomes 17 pt
    20 pt becomes 25 pt

    Laurent
    Before you post ... fill in your OS and IV version in your profile.

    #2
    No such problem here.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Hi Bhikkhu Pesala,

      I remember now that I use 120 dpi font (Windows display settings), instead of 96 dpi. The font size IrfanView reports is in the same ratio (125%) with respect to the size I have selected (12 pt * 125% = 15 pt).
      I think this might be a bug, since IrfanView takes no account of the dpi resolution of the image (Image | Information | Resolution) to scale text.
      What's your opinion?

      Laurent
      Before you post ... fill in your OS and IV version in your profile.

      Comment


        #4
        I have a feeling that font 'dpi' has nothing to do with image dpi. Also, while you stamp your images with text in batch converter, nobody is presuming that they will ever be printed.

        Comment


          #5
          Hi j7n,

          Thanks for the link. The section "The Origin of the Myth - One Shred of Truth" is particularly interesting in this context.

          Here is an example to explain my reasoning. Suppose I am writing an article with my word processor, using Arial 12 points for body text. I want to insert an image 600 pixels * 450 pixels at 300 dpi into my article. This image will have a printed size of 2.0 inches * 1.5 inch.

          Suppose now I want first to use IrfanView to insert text into the image (date/time for example) so that it will appear with the same font and font size as the main text of the article. It seems logical to insert this text using Arial 12 point. What else?

          Given the 300 dpi resolution of the image, I expect the text to be 50 pixels high:
          - if 450 pixels are printed with a height of 1.5 inch (450 px / 300 dpi)
          - the 50 pixels are printed with a height of 1/6 inch (50 px / 300 dpi), which is 12 points (72 * 1/6) as required.

          So the height of the text should always be 50 px, whatever the parameters used for the display of the computer (Control Panel, Display, Settings, Advanced, General, Font Size [Small Fonts | Large Fonts]).

          However, using small font or large font for the display result in different sizes for text inserted with IrfanView (see first and second capture). Moreover, the text has never the expected size when the image is included in a word processor (see third capture).

          So I wonder if these are bugs in IrfanView, "unpredictable results" or normal behaviors. In my opinion
          - sensitivity to display settings is a bug,
          - not taking account of the image resolution (dpi) is a bug too.

          I have to admit that dealing with points and dpi is not always relevant, for example in the case of images for web pages. In this context, being able to insert text with a given size in pixels (not in points) would be an improvement in IrfanView.

          As I could notice, the font size in points reported in the font selection dialog in IrfanView is the height in pixels of numbers and capital letters. Should that height define the font size, then it would mean that capitals 1 inch = 72 points height would have 72 pixels, that is a "virtual" 72 dpi resolution.


          Laurent
          Before you post ... fill in your OS and IV version in your profile.

          Comment


            #6
            Attachments were lacking in my previous post.
            Attached Files
            Before you post ... fill in your OS and IV version in your profile.

            Comment


              #7
              Perhaps there should be a choice whether we want the font height to follow image dpi. It would be quite disorienting if the text came out different size depending on the default (often meaningless) dpi. Some graphics programs always set it to 72, some 96 dpi.

              Also, you would get higher quality output if you added the text using tools of your word processor.

              Comment


                #8
                Incorrect font size and DPI

                Have to agree with Laurent! I also find that the font size selected is not the font size used. I too have the screen (1680x1050) configured to 120DPI, the only size that makes sense with a screen of this resolution.

                I discovered this problem just using the Edit > Insert text... function. I would also want to see the font size selected be the one used, without any tinkering by Irfanview. Once the text is inserted you can see if the size is correct for the purpose. If it isn't then you can always undo and choose a different size. Just make it the size we choose please!

                I've attached screenshots showing what is chosen and what actually results.
                Attached Files

                Comment


                  #9
                  I think that graphics applications should use font sizes in pixels, like web applications. Points are more meaningful to the average user, but only lead to confusion as we see. 12 point text = 16 pixels.
                  Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                  Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                  Comment


                    #10
                    Font sizes in pixels

                    The only problem with font sizes in pixels is that when you select your font from the pop-up window, the font size will show there in points, not pixels. Irfan would have to find some way of converting points to pixels in the pop-up. I'm not sure that's possible as the pop-up is a Windows artefact as far as I am aware, just like the "Save to" window, for instance.

                    Comment


                      #11
                      Originally posted by Bhikkhu Pesala View Post
                      I think that graphics applications should use font sizes in pixels, like web applications. Points are more meaningful to the average user, but only lead to confusion as we see. 12 point text = 16 pixels.
                      Unluckily there is no way to set a size in pixels; only a number of points is available in the font dialogue. What is the rule to compute the font size to select to get text with a given pixel size?
                      Before you post ... fill in your OS and IV version in your profile.

                      Comment


                        #12
                        It is not straightforward, as it depends what you are measuring — Capital Height, x-height, linespacing. What do you mean when say "font size?"

                        The default line-spacing is computed from WinAscent + WinDescent and that varies from one type face to another. !2 point Times New Roman is not the same line height as 12 point Palatino Linotype. However, for web application 16 pixels = 12 point — that is 16 pixels between baselines. That is based on 96 pixels = 1" = 72 points.

                        The height of individual letters is font dependent.
                        Attached Files
                        Last edited by Bhikkhu Pesala; 27.10.2010, 12:37 PM.
                        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                        Comment


                          #13
                          Originally posted by Laurent
                          ... This is written using Arial 12pt in my word processor ...
                          I have tested Arial and Times New Roman in MS Word vs. Wordpad and found that the texts are not always rendered the same sizes in different word processors either. - Comparing with a windows API (by way of the Filtermeister application) I found that neither of the word processors in all cases matches the text created by the API.

                          Eg.:

                          Arial 16pt in MS Word corresponds to API size parameter = approx. 24.5
                          Arial 16pt in Wordpad corresponds to API size parameter = 24

                          Mostly "odd" interpolations that do not divide into 72pt without remainder, like 13pt or 20pt, differ between the word processors.

                          (My screen resolution is 96dpi)

                          currently running 4.56 / 32 bit

                          Comment


                            #14
                            Originally posted by Laurent View Post
                            Unluckily there is no way to set a size in pixels; only a number of points is available in the font dialogue. What is the rule to compute the font size to select to get text with a given pixel size?
                            lfHeight = -(pointSize * deviceDPI) / 72
                            (1 point is 1/72 inch)

                            The font mapper maps the result to device units and matches this value then against the available character heights of the fonts.

                            The big issue is that Windows does not report the real device DPIs. In the standard case it reports 96 DPI. The reason is that a lot of application are not high-dpi aware.

                            Comment

                            Working...
                            X