| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
{get,set}FallbackFont() + Font.getBestCoverage(..); Use fallback-font in MediaButton in case chosen font doesn't match (foreign languages, e.g. 'zho' Chinese .. )
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
traversing through all Glyphs
See UISceneDemo03
new Button(options.renderModes, fontSymbols, " "+fontSymbols.getUTF16String("pause")+" ", buttonWidth, buttonHeight); // pause
Unicode codepoint symbol is also contained in FontGlyph
|
|
|
|
| |
in UISceneDemo03 via hard coded unicode symbol numbers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
agnostic (PMVMatrix, Matrix4f, Vec4f, ..)
Math functionality (PMVMatrix, Matrix4f, Vec4f, ..)
- shall be used toolkit agnostic, e.g. independent from OpenGL
- shall be reused within our upcoming Vulkan implementation
- may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed.
The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData
via the toolkit agnostic SyncAction and SyncBuffer
shall also be split to a toolkit agnostic variant.
An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist,
being derived from the toolkit agnostic base implementation.
+++
Initial commit .. compile clean, passing most unit tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
underlying shape' and add API doc
Regression was introduced with commit 920e529516bb264f04138ed1caca80d4925e3773
'Robust detetection and API definition of non-contour/whitespace Glyphs'.
Issue was mistaken a glyph as undefined if not having an underlying shape,
which is true for some fonts (e.g. 'space').
+++
Also Use post table's name if no underlying shape exists.
|
|
|
|
|
|
| |
non-contour/whitespace Glyphs (detect and allow to skip 'em)
We also drop shapes for both, but for id 0 (unknown).
|
|
|
|
| |
69d22df0a6132dbf8b88fd04090c0bc81129237f IOUtil.copyStream2File() changes
|
|
|
|
| |
matching getGlyphBounds()
|
| |
|
| |
|
|
|
|
| |
(OTFont,Font).getGlyphCount()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ray, AABBox, Frustum, Stereo*, ... adding hook to PMVMatrix
Motivation was to simplify matrix + vector math usage, ease review and avoid usage bugs.
Matrix4f implementation uses dedicated float fields instead of an array.
Performance didn't increase much,
as JVM >= 11(?) has some optimizations to drop the array bounds check.
AMD64 + OpenJDK17
- Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest)
- Matrix4f.mul(b) roughly ~3% slower than FloatUtil.multMatrix(a, b, dest)
- FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all
- Matrix4f.invert(..) roughly ~3% slower than FloatUtil.invertMatrix(..)
RaspberryPi 4b aarch64 + OpenJDK17
- Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest)
- Matrix4f.mul(b) roughly ~20% slower than FloatUtil.multMatrix(a, b)
- FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all
- Matrix4f.invert(..) roughly ~4% slower than FloatUtil.invertMatrix(..)
Conclusion
- Matrix4f.mul(b) needs to be revised (esp for aarch64)
- Matrix4f.invert(..) should also not be slower ..
|
|
|
|
| |
text-processing information
|
| |
|
| |
|
| |
|
|
|
|
| |
OutlineShape.Visitor, allowing to use the Glyph (information).
|
|
|
|
| |
modify values if text and/or font differs, skipping markShapeDirty() saves performance.
|
|
|
|
| |
TextRegionUtil.countStringRegion() allowing to use Region.setBufferCapacity()
|
|
|
|
| |
than enough
|
|
|
|
| |
but recommended)
|
|
|
|
| |
Clock.getMonotonicTime() ...
|
| |
|
|
|
|
| |
(redundant), add getLeftSideBearings*() from htmx table; Flatten TypecastGlyph impl by merging its Metrics, add equal() complementing hashCode()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mapping, rely on no-shape for 'space' non-contour.
Drop erroneous Glyph ID_SPACE, ID_CR to rely on no-shape for 'space' non-contour
resolves different cmap-mappings of fonts, not following 'some std'.
Hence getGlyph(glyph_id) no more uses the `font.getGlyph(Glyph.ID_UNKNOWN)` shape,
but a null-shape as intended and using the hmtx and hhea table values for asvance and bounds.
This fixes 'space' spacing in general and specifically FreeSerif-Regular and the like.
This path also simplifies processing/layout of glyphs in process(..) and get*BoundsFU(..).
|
|
|
|
| |
lineGap, document them properly and fix Font.getLineHeightFU()
|
|
|
|
| |
dropping redundant getMetricWidth*(); Fix getMetricBoundsFU()
|
|
|
|
|
|
|
|
|
|
| |
processString(..) to Font, cleaning up ..
Further having Font.processString() return the AABBox of the whole string's 'laidout' OutlineShapes,
which is used for (debug) Font.getPointsBounds2(..) just to validate the coordinated with
the Glyph based AABBox of Font.getPointsBounds(..).
Static TextRegionUtil.drawString(..) no more require to pass the temp AffineTransform instances (ugly).
|
|
|
|
| |
getPointsBoundsFU(); Glyph: Drop getSymbol()
|
|
|
|
|
|
|
|
|
| |
system.
- All pixelSize metrics methods are dropped in Font*
- TypecastGlyph.Advance dropped, i.e. dropping prescales glyph advance based on pixelSize
- TextRegionUtil produces OutlineShape in font em-size [0..1] added to GLRegion
- Adjusted demos
|
|
|
|
|
|
|
|
|
| |
Use TestTextRendererNEWT01 to produce validation snaps
- Move kerning handling from Font to Font.Glyph using binary-search for right-glyph-id on kerning subset from this instance (left)
- TextRegionUtil: Kerning must be added before translation as it applies before the current right-glyph.
- TestTextRendererNEWT01 produces validation snapshots against LibreOffice print-preview snapshots
- GPUTextRendererListenerBase01 added another text for kerning validation, show more font-size details (pt, px, mm)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
original font-units (FU) to have them scaled later ( fu * pixelScale / unitsPerEM )
Scaling from font-units (funits, or FU) is now performed by the renderer itself,
i.e. applying the scale-factor 'fontPixelSize / font.getMetrics().getUnitsPerEM()'
to the PMV matrix to render the whole graph GLRegion.
This finally provides proper device and resolution independent font utilization.
Further, preliminary kerning has been added.
+++
Also ...
TypecastFont:
- getGlyphID(..) getGlyph(..) enforce symbol mapping to Glyph.ID_SPACE Glyph.ID_CR,
as some fonts ave an erroneous cmap (FreeSerif-Regular)
- add getKerning(..)
TODO: Add binary search
- Set TypecastFont.USE_PRESCALED_ADVANCE := false,
i.e. dropping all prescaled pixel-sized advance values mapped to font pixel-size
as we utilize font-units only for later uniform scaling.
- Drop virtual getPixelSize() and add static FontScale.toPixels(..)
- Add fullString() for debugging purposed, including some font tables
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
d78bb1be0a6290cb94918b21865a023c01825048
- Skip relative lookup for IOUtil.ClassResources using 'asset' only (from JAR file)
- Tested w/ jar file and build-dir, see scripts/tests.sh 'USE_BUILDDIR'
|
|
|
|
|
|
| |
bd24599b21f9787ac989e65b44dc1ba762162f22
- add missing PrivilegedAction around tempFile[0].delete()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
628509b39ea7c16210315d191860511d6be4aa69)
FontFactory Remove:
- Font get(final URLConnection conn)
- Font get(final InputStream stream)
FontFactory Add:
- [1] Font get(final InputStream stream, final int streamLen, final boolean closeStream)
- Direct usage of font InputStream w/ determined length,
may instantiate BufferedInputStream in case given stream
doesn't support mark/reset!
- [2] Font get(final InputStream stream, final boolean closeStream)
- Copy font InputStream w/o determined length,
resulting in BufferedInputStream supporting mark/reset!
Security Related:
- Only perform priviledged code on determine InputStream,
_not_ when parsing the font stream itself!
- Hence PrivilegedAction only happens in FontFactory's
InputStream preparation.
Misc:
- Use Uri class
|
|\ |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in shader; Update attributes and uniforms manually, drop ShaderState;
- ShaderCode
- add int insertShaderSource(int shaderIdx, int position, Class<?> context, String path)
- insertShaderSource(..): pos==-1 -> append code
- VectorUtil
- add isVec3InTriangle3(..., float epsilon)
- add testSeg2SegIntersection(..., float epsilon)
- add testTri2SegIntersection(..., float epsilon)
- AffineTransform: Return result for chaining
- Font
- Add pixel precise 'getPointsBounds(final AffineTransform transform, CharSequence string, float pixelSize)'
- Rename getString*() -> getMetric*()
- OTGlyph: Release _points field, no more used
-
- Graph Triangulation
- Count additional vertices in: Triangulator, CDTriangulator2D
- OutlineShape:
- Allow skipping of 'transformOutlines2Quadratic', i.e. allow tagging
OutlineShape to be quadratic_nurbs via 'setIsQuadraticNurbs()'
- Clarify cleanup ot outlines in same method 'cleanupOutlines()'
- Count additional vertices ..
- Graph Shader:
- Start splitting and segmenting shader code for:
- pass1 / pass2
- features, i.e. sampleCont, color-channel, ..
|
|
|
|
| |
(performance, reduce temp objects)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Proper FontSize -> PixelSize
VBAA Render-Mode Based on SampleCount (not a user-based texWidth)
- All Region based APIs now use 'sampleCount' instead of 'texWidth'
- VBORegion2PES2 calculates perspective FBO width/height considering the sampleCount
Proper FontSize -> PixelSize
- Font: Add getPixelSize(fontSize, dpi)
- Text* Demos/Classes: Use proper fontSize -> PixelSize
|
| |
|
|
|
|
|
|
| |
Minor edits:
- Add some docs to curve-shader and remove FIXME remark about gcu_Alpha, which will be used < 1.0.
- Font: Add more TTF references
|