I have a font-made image and I'm curious, is it possible to convert it into real font in Java?
(e.g .ttf form). I don't find any "how to" for this.
read this document i think it helps you.
http://docs.oracle.com/javase/tutorial/2d/text/fonts.html
Related
Is there a way to check if otf font file contains glyphs for small caps variation?
Is there a way to do it in java?
Thanks!
There is, just don't use standard-library-Java for it. Use either a Java OpenType font analyser, or do the more sensible thing and consult Freetype2 or Harfbuzz for that information.
Really, anything that lets you check OpenType features will do: check whether the font encodes for the smcp feature - if it does, it support proper smallcaps as per the OpenType spec. If not, it doesn't, and whatever text engine you're using is going to fake it.
I already know how to write to an rtf file in Java, but is there a way to do it with colored texts? I want to do it in a way that would let me alternate the color between words.
You might want to check this link to the documentation about color in RTF. You need to declare a color table and then select the color of your choosing for foreground/background.
Hope this helps
I have color image document with text and images and tables.
Document can have two columns.
Document is composite from areas: area header and text (bigger font, can have different font color and something like sub-header additional data).
This is exemplary image but real one can be color:
What i need to do.
I need find on image document this areas of text with headers.
What i need to know.
Method how to divide document to divide document on particular parts.
I try with opencv in java(if someone have python and c++ version i can convert it for java version by myself). I found few similar problem on stack overflow, but none of them can help me. You must know that my opencv knowledge is not very well and it is only from on-line tutorials and stack overflow.
Is there any fine solution on my problem in opencv way or i need use something else, different library or application to achieve this?
One and only requirement is that it must be done from command line.
If i had this areas i can do what i need next, but this is step which stops me.
have you solved the problem?
I'm working on a similar problem.
My solution is to use HoughLines https://docs.opencv.org/3.4.0/d9/db0/tutorial_hough_lines.html
You can use text detection combined with dilation to detect bold text i.e. headers and then group the text boxes between two consecutive headers as the text under first header.
I need to detect the text on the product
I need to extract the text "GOLD WINNER".
I tried OCR (tesseract) but it didn't work.
I can tell you two way for solution;
You can use opencv solutions like SURF/SIFT, or free ones ORB etc.
Features2D + Homography to find a known object
You can try to find font name of your target image and create a new language data using tesseract.TrainingTesseract
I develope new program but i need to allow user to highlighting word in pdf file then i want to process the file to get list of highlighted words with place
how can do that by java
thank in advance
PDF files are PostScript, which is very difficult to process. I doubt there's an easy way.
Take a look at http://java-source.net/open-source/pdf-libraries , but be aware you might have some difficulty.
Also, read http://partners.adobe.com/public/developer/en/pdf/HighlightFileFormat.pdf for the specs of the highlight format. Depending on what "place" information you need, that might be enough.
How are you displaying the PDF? If you are displaying the image, you just need the word co-ordinates. Something like PdfBox or JPedal or maybe IText can do this.