Announcement

Collapse
No announcement yet.

More flexible text input ability

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

    #16
    Hi
    Concur with an earlier poster, that a preview of the text size in the dialogue box window would be nice. Seems that the program has the box size and the selected font, so should be able to preview the "relative text size inside the box" in the dialogue box window. Just that I am unpracticed at selecting the font size and spend a lot of time getting it correct.
    many thanks for all the work.

    Comment


      #17
      Why not simply...

      Why not simply take the coordinates from the selected area, and based upon the image density (pixels/inch) automagically adjust the font size so as to fill the selected area with the desired text - no more, no less? Possibly include an option to wrap the text vs not wrapping it.

      Comment


        #18
        Would be a useful feature, but I'm afraid, full of quite complicated calculations. Normal or bold?
        So for the moment a preview pane in the dialog as a try-and-adjust function would be quite sufficient.
        0.6180339887
        Rest In Peace, Sam!

        Comment


          #19
          I'm currently working to add a good text tool to IrfanPaint. Here's a screenshot of what I've already done:

          .

          It works more or less as the text tool of any image manipulation program, i.e. there's no need to select the area before using it, just click and type.
          IrfanPaint developer
          The latest stable IrfanPaint version is the 0.4.13.70.
          IrfanPaint is now open-source (released under BSD license).

          Comment


            #20
            Very promising..
            0.6180339887
            Rest In Peace, Sam!

            Comment


              #21
              Originally posted by Sam_Zen View Post
              Very promising..
              yes, indeed. - Is there a function/api or something that lets you access a list of installed fonts? - I looked a while back, but couldn't find anything.

              currently running 4.56 / 32 bit

              Comment


                #22
                Yes, EnumFontFamiliesEx. Here's an excerpt from the code of IrfanPaint that adds the font names to the combobox.
                Code:
                //Handle of the font names combo
                HWND hfn=GetDlgItem(hwnd,IDC_IT_CO_FONTNAME);
                //...
                //Enumerate the fonts
                EnumFontFamiliesEx(DibSect->GetCompDC(),&lf,(FONTENUMPROC)&InsertText_EnumFontFamExProc,(LPARAM)hfn,0);
                
                //...
                
                #pragma warning (push)
                #pragma warning (disable:4100)
                //Callback of EnumFontFamiliesEx
                int CALLBACK InsertText_EnumFontFamExProc(ENUMLOGFONTEX *lpelfe,NEWTEXTMETRICEX *lpntme,DWORD FontType,LPARAM lParam)
                {
                	//If it's a TrueType font add it to the combobox
                	if((FontType&TRUETYPE_FONTTYPE)&& ComboBox_FindStringExact((HWND)lParam,0,lpelfe->elfLogFont.lfFaceName)==CB_ERR)
                	{
                		ComboBox_AddString((HWND)lParam,lpelfe->elfLogFont.lfFaceName);
                	}
                	return TRUE;
                }
                #pragma warning (pop)
                IrfanPaint developer
                The latest stable IrfanPaint version is the 0.4.13.70.
                IrfanPaint is now open-source (released under BSD license).

                Comment

                Working...
                X