| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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()
|
| |
| |
| |
| | |
determine CurveRenderer issues
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
win<->obj coord transformation, enhance documentation a little,
Have win<->obj coord transformation in UIShape public:
- Move SceneUIController.transformShape() -> UIShape.setTransform()
- Move SceneUIController.windowToShapeCoordsImpl() -> UIShape.winToObjCoord()
- Add UIShape.objToWinCoord()
- Add UIShape.getSurfaceSize()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
endOfContour), remove redundant branch B3, add Type-2 and add code dump for testing
Realigned renderer code w/ Typecast's AWT demo:
- TTF Quadratic Shape
- The inner loop 'offset < count' is sufficient, otherwise could drop last point
- point_0.endOfCountour is valid as a last point
- Branch-3 and hence point-3 is not required as handled via B4 and subsequent B6
- Type-2 Cubic Shape
- Added .. not tested yet
Also added optional debug code dump via
java cmdline `-Djogl.debug.graph.font.Renderer.Code`,
which dumps plain OutlineShape construction code for testing
and debugging our CurveRenderer.
|
| | |
|
| | |
|
| |
| |
| |
| | |
test cases
|
| |
| |
| |
| | |
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)
|
|
|
|
| |
notAvailable String
|
| |
|
|
|
|
| |
higher API layer w/ binary-search
|
|
|
|
| |
variable in range-based for-loops
|
|
|
|
| |
ctor for File and InputStream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
0d55ac0eb4a39a7f8f2a796c7eebd3ea778ba9a7
- Using Typecast's new git repo https://github.com/dcsch/typecast
- Preserved our changes
- Preserved loading fonts and glyph on input stream w/o font data array copies
TODO
- Maintain an original branch in Typecast w/ our changes
to ease updates. Then we merely need to change the package name.
- This also shall help to allow Typecast to use our patches,
if so desired.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
| |
and hold a KernSubtableFormat0 ref in KernTable
|
| |
|
|
|
|
|
|
| |
Add Path2F addPath(..), emphasize required Winding.CW
GPURegionGLListener01 used by TestRegionRendererNEWT01 covers Path2F CCW and CW (reverse add) methods.
|
|
|
|
| |
addVertex methods
|
|
|
|
| |
blending stubs in display (Mesa3D results are otherwise broken)
|
|
|
|
| |
window size 1024x640
|
|
|
|
| |
custom window size
|
|
|
|
| |
vertexFactory instance
|
| |
|
| |
|
|
|
|
| |
and index etc, used to avoid arraycopy (efficancy)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
monitor values w/ QT_SCREEN_SCALE_FACTORS syntax, use for X11
Per-monitor values are parsed if value is not a float and stored
in a given Map<String,float[2]>, parallel to a detected global_pixel_scale_xy.
The per-monitor value syntax matches QT_SCREEN_SCALE_FACTORS,
i.e. the regular expression '(<string>=<float>;)+',
e.g. QT_SCREEN_SCALE_FACTORS='DP-1=1.25;DP-2=1.25;HDMI-1=1.25;'
The per-monitor value is preferred and on X11 stored within the MonitorDevice,
matching the MonitorDevice's name.
The following env-var names are searched on X11:
"QT_SCREEN_SCALE_FACTORS", "QT_SCALE_FACTOR", "GDK_SCALE", "SOFT_SCALE"
|
|
|
|
|
|
| |
to the root window (global screen) ..
.. otherwise, we might end up receiving a client position of 0/0, while being positioned in a different absolute place within root.
|
|
|
|
| |
object
|
| |
|
|
|
|
| |
for X11 and Windows for now.
|
| |
|
|
|
|
|
|
|
|
| |
WindowDriver, used to call the super class method.
Regression of commit cfc35549810d3a0fb5eeb866c9450417e48cd8a1
Note to myself: You can't enforce a 'this' method call overridden with a virtual from a subclass.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(working state)
Both:
- Using Soft-PixelScale mode, i.e. converting all given window-units to pixel-units for native GDI/X11 ops
- Using scaled pixel-sized surface
- Adjusting NEWT's Monitor's window-unit viewport value to pixel-scale
For X11:
- Using global scale factor from environment variable, either: "GDK_SCALE", "QT_SCALE_FACTOR" or "SOFT_SCALE".
The latter is for testing only.
See https://wiki.archlinux.org/title/HiDPI
For Windows:
- Using actual monitor's pixel-scale via native SHC API (Shellscaling API, shcore.dll)
Misc:
- SurfaceScaleUtils.getGlobalPixelScaleEnv() reads a float value from given env names, first come, first serve
- MonitorModeProps.streamInMonitorDevice(..): Add `invscale_wuviewport` argument to scale wuvieport for soft-pixel-scale
- TestGearsNEWT: Enhance GL2 demo to be suitable for manual tests, this since my Windows KVM machine doesn't support ES2
- TestGLContextDrawableSwitch10NEWT: Add a few more test constraints .. working
Tested:
- Manually on a Windows virtual machine (KVM) using
- 2 virtualized 'Video QXL' cards and
- and 'remote-viewer' to see the 2 monitors
since `Virtual Machine Manager` build-in doesn't support
- remote-viewer spice://localhost:5917
- Manually on a Linux machine w/ SOFT_SCALE
- Both, X11 and Windows
- Place window on each monitor
- Move window across monitors w/ pixel-scale change (or not)
- TODO: Test and fix utilization with AWT, i.e. NewtCanvasAWT
|
|
|
|
|
|
|
| |
general usage
See MonitorDevice.getOrientationTo(MonitorDevice, int[]) to setup the move_diff
as added in commit 43dc472c4797f34e4079028a5eb04bc420c11c2a
|
|
|
|
|
|
| |
set a custom position additionally to size
This added functionality is desired when adjusting the window position and size when changing the soft-pixel-scale
|