I want to adjust the spacing between an inserted image and the caption (HTML output). The default output in latex/PDF looks nice. But the space in html is way too little (see the attached image).
I searched around but found no solution so far. I would imagine that this can be solved by adjusting the margin of the image, margin of the caption, or adding vertical space, but really need some guidance on how. Any suggestion is appreciated!
Related
Good day !
I have this blog.
I would like to have these changes (for comment-box):
rounded corners (inside too)
same colour for background but for boxes with text I want to be set on white with black borders
An example of my blog is this or the image below.
I saw & tried more tutorials of the internet but no solution for me.
Do you can help me ?
Thank you in advance.
I need to add a title bar named "Crop Image" in this Cocoapod.
Please help me
I'm the developer of TOCropViewController. :)
There's no feature in the library at the moment to display text above the cropping content right now. But it would be fairly trivial to add a UILabel to the view and position it near the top of the view.
The challenge is that you'd then need to account for it when the device is rotated sideways. At the moment, the cropping content will fill the entire height of a horizontal device, so you'd need to override that to account for the text.
It's been a while since I wrote it, but I did include a property in the vertical layout code to add padding to the top of the view controller, so it SHOULD be relatively easy.
I sadly don't have time to add it myself, but I made an issue on the repo and added the pr requested tag. Hopefully someone with more free time than I do can add it. :)
I've been trying to find a way to change a font file's line spacing default value, using QFont, QFontMetrics or something like that. I'm using QPainter::drawText to draw some text in a bounding rectangle.
It's strange that QFont allows for font kerning to be changed and even has some stretch operation and letter spacing but nothing to change the default space between lines. I've searched and found some partial solutions using QTextLayout but none seemed to work properly.
I need to use QPainter because I generate a texture with the text to be rendered with OpenGL.
Looking for more ideas for me to try out!
UPDATE
I've found that I can use QPainter to draw a QStaticText which allows for HTML text formatting, similar to QTextDocument. However, CSS styling doesn't work like in QTextDocument (there's a bug report)... Therefore still no leading but I hope this puts me on the right track.
SOLVED
I got what I wanted using QTextDocument, like Mykhaylo suggested. Link to solution
QFontMetrics was not designed particularly for multi-line text.
Use QTextDocument. You can print multi-line and rich text with it, even using QPainter. See the solution how to use QPainter with QTextDocument
It seems there is not much that can be done here.
QFontMetrics::lineSpacing returns what you need but it is read-only.
It's the sum of font height and leading. You can adjust height - set it in QFont constructor. But you can't set leading.
Some people add \n to the end of string to increase space between lines but of course this is not always a good solution.
I often use a TPanel or TGroupBox to group my form controls.
Now I need to draw just a straight line like the border of a Panel or GroupBox.
How do I do this on LAZARUS?
Thanks in advance!
Note: The technique must work on both Linux and Windows
As an optical line separator you should use either the TBevel component with Shape property set to one of the following values bsTopLine, bsBottomLine, bsLeftLine or bsRightLine depending on which line you currently need and resize it to a smaller size (in your case you can use bsTopLine or bsBottomLine and resize the bevel vertically):
Or you can use a special component called TDividerBevel which except the single line adds to this optical divider also a caption:
Here's what I've finally done but I'm not sure if this is the RIGHT way so I won't accept my answer. If there's someone else who can point out any issues with this, please let me know. I found this pretty straightforward as well :)
Place a TGroupBox on the form.
Leave the Caption property blank. Now it should look like a panel with only borders.
Use the mouse and drag the bottom border towards the top. Now it looks like a line.
Well, I personally think this method is NOT efficient as it would take up more memory space than just a real straight line. Anyway, so far it seems to work for me :)
Here's the screenshot - look towards the bottom (just above the last text box). The only issues is that on the sides of the line, it shows the lines bending. I think I should set the properties correctly than dragging with the mouse.
I want to know if exist templates to add text on photoshop like in the following pictures:
http://sphotos-e.ak.fbcdn.net/hphotos-ak-ash4/485070_566956359990277_263279122_n.jpg
https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash4/3263_403189956409783_609225582_n.jpg
Could you suggest some pages where I can study and try those effects ?
Thanks.
Step1: Find the fonts. Search on font sites for similiar fonts or try to cut out the font and upload it to http://www.whatfontis.com/ or http://www.myfonts.com/WhatTheFont/
Step2: just play around with blending options and stuff.
from what I can see it's these settings you want too look at:
"Notche Latina": Gradient overlay, white stroke and black dropshadow.
"photo recoblablabla": inner shadow and might be in overlay-mode or something
"Festival de la bira": once again, white stroke
First make a layer adjust the objcet on layer as per your requirement.
Add some effects from filter gallery if you required (or layer style).
Click on the text toolbar type your text (required text).Then to apply effects
right click on text layer and click on rasterize type.now you can add effects from the filter gallery to the text.(or Layer style eg-inner shadows,bevel and emboss).