OGLES 2.0 2D Text Rendering using Freetype - opengl-es-2.0

Following to link Rendering fonts with Freetype and OpenGL
Iam very new to opengles and freetype.
Can we have another solution for the question in the link? since my project use opengles2 which doesnot contain the symbols GL_R8 and GL_RED.
Do we need to use any GlDraw function after glTexImage2D or glTexImage2D function alone will be enough to display the text using truetype font on the display monitor?
Without using glew, glut functions.

Related

Problems Converting to Evo PDF

I am using version 8.0.0 of "EvoPdf.HtmlToPdf.NetCore" package in my project. When I try to get the radar canvas image as pdf output, I am not successful. The pdf output is blank. I don't think there is any problem in the code we created the canvas. I am using Chart.Js version 2.9.3 for radar canvas.
The same problem exists when I want to convert "https://www.chartjs.org/docs/latest/samples/area/radar.html" to pdf with "https://www.evopdf.com/demo/" help. Canvas is not drawn in pdf file.
You can read this official article:
https://www.evopdf.com/html-to-pdf-converter.aspx
You can download the code samples provided by him according to the asp.net core you use.
It currently only seems to support .net core2 and 3 versions.

Convert - GLTF/STL/OBJ file formats to U3D file for PDF page

I am trying to add three.js based 3D objects to a PDF page. It seems there are no direct exporters available to do that. So I am trying to do the below thing,
Convert the gltf/stl/obj files to U3D files
Add the .u3d file to PDF page.
I am trying to do the below process and I am not sure whether this approach is possible. It will be a great help if there is any support available to do any one of the below conversions. Also if you know any other possible approaches, kindly update me!!
Input formats output format
GLTF
OBJ U3D
STL
(any
three.js supported
3D formats)
Thanks.
There are few options available to export the three.js graphics to a PDF ( static content not a dynamic U3D assets)
Static contents
Get the rendered data from the three.js webGL renderer / canvas renderer using toDataURL("image/jpeg"), change the MIME type to JPG/PNG and add the resulting stream as an image to PDF ( this worked for me)
example - https://plnkr.co/edit/Ty8BZaDcflCJH5tH?preview
Like the above approach we can use three.js svgrenderer to export the renderer contents into a SVG data stream, which can be added into the PDF ( textures, mesh may not be 100% reproduced)
The legacy API - "threejs-pdf-renderer" can be used to directly export the three.js animations to a PDF. We don't need any other dependencies to create the PDF. But this is a legacy API which uses legacy three.js version, lot of effort needs to be done to make the API to be compatible with the latest three.js version.
example - https://satheeshks10.github.io/ThreejsPDFGenerator/
Dynamic 3D contents
We can export the three.js animations into a U3D file (no direct support is available as for now), this U3D file can be directly embedded into PDF.
example - https://tetra4d.com/pdf-samples/

How to know when an input field is focused from a QML Webview in Qt5

I'm working on an UI in QML for an embedded linux (for now raspberry pi/raspbian, but the HW will change pretty soon). I'm using Qt 5.0.2
I integrated a QWebKit browser using the QML WebView.
I want to be able to know when an input field is focused, I found some solutions using JS (using addJavaScriptObject or evaluateJavaScript) but all of them are working for Qt4.7/4.8 and Qt5 seems to have drastically cut the number of usable methods for the QML WebView.
Do you know a way to get this information? can we do it directly in the QML files?
Thx,
Arthur

Sample cairo applications to test cairo-gles backend in 1.12.14

I was able to successfully port, cross compile and run the cairo gears
application in gles backend, on my embedded system target.
http://people.linaro.org/~afrantzis/cairogears-0~git20100719.2b01100+gles2.tar.gz
The ported samples trap, comp, text and shadow run well in cairo1.12.3
and 1.12.4.
But I face problem in running the same in 1.12.14.
I could not run the texture related samples like comp, text, shadow.
Trap plays well but the gradient could not be displayed in the gradient sample.
I use gles backend and converting all image surfaces I load from png
file to gl surface.
Let me know if there is something that should be done for the
texture+gradient samples to work in 1.12.14.
thanks
Sundara raghavan
The problem was because of the need to convert the GL_BGRA,the internal image format of cairo , to GL_RGBA for loading in to GL textures (which were GL_RGBA by default). I solved it by applying an existing patch which uses BGRA GL texture and hence avoids conversion. This was possible because my hardware is capable of both reading as well as creating bgra textures.
The Patch was found here:
http://lists.freedesktop.org/archives/cairo/2013-February/024038.html

Search and Highlight text in PDF for IPad

I am working on the PDF App for iPad and facing an issue: how to search a text in PDF and also how to highlight that text?
Yours is the same big problem I'm having. My understanding is that, currently on iOS 4.0, the main public API is CGPDF . It allows us to parse PDF, and with it we can search strings in it. See also this Quartz 2D document. It also allows us to render it on the screen using CGContextDrawPage. However, it's not yet possible to get the position of a text in the rendered image. (On OS X it's possible using PDFKit.)
So, I'm afraid that you need to implement the PDF spec yourself to get that info. I think GoodReader etc. is working very very hard to implement these.
I had the same trouble recently and then I found FastPDFKit. Have tested the package and it's working great.
http://mobfarm.eu/fastpdfkit