| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
indices growBufferSize(); Add GLRegion.create(..) w/ initial vertices/indices count; Up default[VI]Count;
Following heuristcs were found, hence we might want to calculate these for each font (TODO):
/**
* Heuristics with TestTextRendererNEWT00 text_1 + text_2 = 1334 chars
* - FreeSans ~ vertices 64/char, indices 33/char
* - Ubuntu Light ~ vertices 100/char, indices 50/char
* - FreeSerif ~ vertices 115/char, indices 61/char
*
* Now let's assume a minimum of 10 chars will be rendered
*/
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
variants for flexibility/performance
Notable: The array-put is slower than small range single-puts, e.g. put3i(..).
Uses GlueGen's Buffers change commit 69b748925038b7d44fa6318536642b426e3d3e38
|
|
|
|
| |
createDummyDrawable(..)
|
|
|
|
| |
is not orig-owner
|
|
|
|
|
|
| |
dropping its usage (GLArrayDataWrapper validation)
Skip GLProfile based index, comps, type validation, might not be future proof.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ease GLArrayData* buffer growth.
Using integer indices, i.e. GL_UNSIGNED_INT, requires us to pass a GLProfile 'hint' to the GLRegion ctor.
Region.max_indices is computed in this regard and used in Region.addOutlineShape().
TODO: If exceeding max_indices, the code path needs some work.
Buffer growth is eased via GLArrayData using its golden growth ratio
and manually triggering growth before processing all triangles in Region.addOutlineShape().
+++
TextRegionUtil static drawText() won't clear passed Region anymore, caller has to do this if so intended.
|
|
|
|
| |
additional components ...
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
finalize immutables, add growthFactor (default golden ratio 1.618), add getCapacity*() and printStats(..)
The growthFactor becomes essential for better growth behavior and can be set via setGrowthFactor().
The other changes were merely to clean up the GLArrayData interface and its 4 implementations.
Not great to change its API, but one name was misleading ['getComponentCount' -> 'getCompsPerEleme'],
so overall .. readability is enhanced.
Motivation for this change was the performance analysis and improvement of our Graph Curve Renderer.
|
|
|
|
|
|
| |
(fontName, text) for equals
Otherwise we would need to use a mostly collision free secure hash algo, Black2b-512 or sha256/512
|
|
|
|
| |
(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()
|
| |
|
| |
|
|\
| |
| | |
Add missing case in getDbgSeverityString()
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
rules for OutlineShape and add get/setWinding in Outline
Loop.initFromPolyline()'s Winding determination used a 3-point triangle-area method,
which is insufficent for complex shapes like serif 'g' or 'æ'.
Solved by using the whole area over the Outline shape.
Note: Loop.initFromPolyline()'s Winding determination is used to convert
the inner shape or holes to CW only.
Therefor the outter bondary shapes must be CCW.
This details has been documented within OutlineShape, anchor 'windingrules'.
Since the conversion of 'CCW -> CW' for inner shapes or holes is covered,
a safe user path would be to completely create CCW shapes.
However, this has not been hardcoded and is left to the user.
Impact: Fixes rendering serif 'g' or 'æ'.
The enhanced unit test TestTextRendererNEWT01 produces snapshots for all fonts within FontSet01.
While it shows proper rendering of the single Glyphs it exposes another Region/Curve Renderer bug,
i.e. sort-of a Region overflow crossing over from the box-end to the start.
|
| |
| |
| |
| | |
dropping redundant getMetricWidth*(); Fix getMetricBoundsFU()
|
| |
| |
| |
| | |
optional AffineTransform (see Label0)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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()
|
|/
|
|
| |
plane.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Add Path2F addPath(..), emphasize required Winding.CW
GPURegionGLListener01 used by TestRegionRendererNEWT01 covers Path2F CCW and CW (reverse add) methods.
|
|
|
|
| |
addVertex methods
|
| |
|
| |
|
|
|
|
| |
and index etc, used to avoid arraycopy (efficancy)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLContext.isGL3bcAvailable() check
Julien Gouesse resolved this odd issue, where a requested GL2 profile was mapped to GL3bc but is not implemented,
see <https://forum.jogamp.org/InternalError-XXX0-profile-2-GL2-gt-profileImpl-GL3bc-not-mapped-td4041754i20.html#a4042018>.
I exploded his patch a little to reuse the GLContext.getAvailableGLProfileName() result
and simplify the conditional statement.
This might need more testing perhaps, plus analyis why GLContext.getAvailableGLProfileName()
offers GL3bc but is not available via GLContext.isGL3bcAvailable() check.
|
|
|
|
| |
GLEmitter
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
native DPI toolkit aware platforms (Linux, Windows)
NEWT + NewtCanvasAWT:
Maybe create "interface ScalableSurface.Upstream {
void pixelScaleChangeNotify(final float[] curPixelScale, final float[] minPixelScale, final float[] maxPixelScale); }"
to allow downstream to notify upstream ScalableSurface implementations like NEWT's Window to act accordingly.
+++
AWT GLCanvas: Add remark where to add the potential pixel scale.
|
|
|
|
| |
setBounds(..)
|
|
|
|
|
|
| |
gets realized on MacOS
This fixes GLCanvas's High-DPI scaled size issue on MacOS of Bug 1358.
|
|
|
|
| |
See gluegen commit 178c7b9d40e06a04790542241912ca21d2c7b92f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLProfile.computeProfileImpl(..) as of Bug 1084 is not the culprit here and its hardware criteria filter works.
The issue is commit 99a064327bf991318841c858d21d13e55d6b39db of Bug 1203,
in particular the change in GLProfile re:
"Merge computed EGL-Profile-Map (1) and Desktop-Profile-Map (2)
per device, instead of just using the last computation,
preserving and favoratizing the Desktop-Profile-Map."
Here the Desktop-Profile-Map overwrites the EGL-Profile-Map and hence
the software mapping gets used.
Indeed, this is a regression cause by the work of Bug 1203.
+++
Resolution is to revert the explicit 'union mapping'
and rely on an enhanced 'GLContextImpl.remapAvailableGLVersions(fromDevice, toDevice)' function.
Here the EGLDrawableFactory _already_ maps the EGL device's GL Versions to the 'host' device (e.g. X11).
This has to be refined so that the remap will not overwrite the 'host' device's already detected GL Versions.
That alone is enough, so that GLProfile can simply use the 'mappedEGLProfiles' of the 'host' device if detected, which already is a merged mapping of X11 host- and EGL sub-device.
In case no 'mappedEGLProfiles' are available, we simply use the 'mappedDesktopProfiles'.
|
|
|
|
| |
CapabilitiesImmutable not being GLCapabilitiesImmutable
|
|
|
|
|
|
|
|
|
|
| |
NVIDIA 440.36 using FBO
Tested with com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsNewtAWT,
which crashes in native makeCurrent of NV driver gl-core when using SurfacelessCtx.
Therefor we had to revert the commit 4fe9e1dfa67f4e5d614f48c02ad88e4cdd1ed415
enabling SurfacelessCtx with NV driver >= 430.40.
|
|
|
|
| |
RemovalCriteria as all Test definitions may be used for anything.
|
|
|
|
|
|
|
|
|
| |
and No10BitColorCompOffscreen
Further enhance unit tests TestGLProfile03NEWTOffscreen,
i.e. test all meta profile types on all offscreen drawable types (fbo, pbuffer and bitmap).
Align unit test name numbers of TestGLProfile01NEWT to TestGLProfile03NEWTOffscreen.
|