image processing - Imagemagick: Draw text in a bounding box with long ascenders and descenders -


I have found a little bit of a strange question, and after parsing it for hours through extensive documentation of ImageMagic I could not find any answer

I have a program that creates a text box inside large images. My current solution uses the label: and caption: To make a temporary image a reasonable size, then this image has been composited into a larger image later. It has worked for me so far.

  Convert \ -size \ 321x93 \ -font \ Carolyna-Pro-Black-Regular \ -pointsize \ 43 \ -fill \ # 808080 \ -Gravity \ Center \ label: "Carolina Pro Black \ nis an unpleasant font. " However, recently I have added some new fonts, and it is a pain to work with these fonts because they have large chicks and descents (loopy). , Curly bits above and below the text.) In the case of these fonts, these rotations and descendants should eliminate their bounding box. I have tried a few things, but no one generates the desired effect:  
  1. Making the bounding box larger: It seems that this will work, but when the north-gravity is set to the north Different types of draw commands: They do not give me the ability to use the severity to align my text within the bay box, and do not seem to work with multi-line text. .
  2. Do not specify a one-size argument and it may be the only option to crop the image later, but it will take several manual computations to align the text correctly, and in the process Can add an extra step Basically, my problem is that I need the alignment capabilities of the text which provides the label: but I do not want my text to be unnecessarily cut.

    Any thoughts?

    Before adding a new line character before and after the solution text and up and down of the bounding box It is not that easy to add height.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -