This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
forked from memononen/nanovg
-
Notifications
You must be signed in to change notification settings - Fork 6
Fix stencil strokes and update to latest nanovg #5
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit fixes the issue that font size is inconsistent between different font files. `stb_truetype.h` is also updated to the latest version to support additional font types such as OpenType fonts.
Fixes the issue that font size is inconsistent.
This commit allows loading a certain font face from a font collection file such as TTC.
Support for loading a certain font face from a font file.
… on high DPI screens
Pass fringe parameter to renderTriangles
This commit adds `nvgResetFallbackFontsId()` and `nvgResetFallbackFonts()` functions for resetting fallback fonts.
Support for resetting fallback fonts.
This commit fixes the demo’s font sizes for the changes in memononen#558, which makes the rendered font size matches what you saw on other native apps. The demo used bigger font sizes than they actually were. This commit deduces the font sizes to match the original demo’s look.
Fixes the issue that line gap may ruin the text layout.
Fixes demo’s font sizes.
fixes the WebGL error "RENDER WARNING: there is no texture bound to the unit 0"" in Chrome
- nvgTextBreakLines: wordMinX was relative to rowStartX, which caused problems when rowStartX change on line break, but wordMinX was still relative to the previous rowStartX - fixed font size on perf graphs - made demo to use row minx/maxx instead of row->width - fixed demo hover distance
Bind a dummy texture in setUniforms when compiling with emscripten
In Visual Studio 17, I get warnings related to these variables: ```` fontstash.h(241): warning C4018: '<': signed/unsigned mismatch fontstash.h(242): warning C4018: '<': signed/unsigned mismatch ```` Making them unsigned fixes it.
Fixed Signed/Unsigned Comparison Warning
Added a preprocessor definition to disable the use of stb_image
fix for freetype glyph loading
Single-byte typo fix
Fixed text vanishing when the transform is vertically flipped
…eleteInternal Update fontstash.h
Originally there is only a shared `FT_Library` object. However, if we create multiple `NVGcontext` objects and as soon as we delete one, the shared `FT_Library` object will be released, too. And that would cause a problem for the rest of `NVGcontext` objects.
Fixes FreeType errors when dealing with multiple NVGcontext objects.
This commit fixes the issue mentioned by memononen@0b37350#r63095702
Fixes stbtt implemention
Modify the demo to generate more CPU and GPU for perf comparison.
Allow switching between the two. The glad binary FPS is 1% higher than glew for some reason
Vulkan Configurator provides a better way to control debug logging.
Use minimum 3 images in swapchain. Change submit barrier from ALL_GRAPHICS_BIT to COLOR_ATTACHMENT_OUTPUT.
...or il fix it myself tomorrow after accepting this... |
okey il accept it then, and fix it myself. Thanks for this huge update! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR:
Merge latest nanovg
Fix Stencil Strokes:
I added a new enum to handle the 3 different pipelines used for stencil strokes.
I wanted to also use enums for the fill-path (nvgFill) to make the code cleaner, but haven't done that yet.
I combined the 2 CMakeLists.txt into example/CMakeLists.txt and added some bits to make it easier to build and debug in MSVC/VSCode.
I added GLAD as default gl-loader for the GL3 example. It can be switched back to GLEW (I kept glew to allow easier merge with main nanovg)
I Increased the number of swapchain images to minimum 3 and updated the swapchain barrier to gain some extra performance.
Spacebar renders the demo multiple times to add some 'load' when comparing performance
If you want to merge just bits of my branch you need to merge it yourself 😋