dwmkerr / sharpgl

Use OpenGL in .NET applications. SharpGL wraps all modern OpenGL features and offers a powerful scene graph to aid development.
MIT License
768 stars 300 forks source link

Enhance text rendering #217

Closed ftlPhysicsGuy closed 1 year ago

ftlPhysicsGuy commented 1 year ago

This provides several modifications, primarily in FontOutlines.cs, that enhance text rendering as follows:

  1. Adds a depth option for stacking text in z
  2. Draws text strings that enter from outside the frame, which were not being drawn before
  3. Replaces linq expressions (for look-ups and list creation) with faster methods

Reviewing the files before submitting this pull request, I noticed I had left fields that were used during testing. The following lines in FontOutlines.cs can be removed from this request:

    // Oops -- Remove these fields that were used during testing
    long totalDrawTextTicks = 0;
    int totalDrawTestCalls = 0;
    double baselineTicksPerCall = 0;
codecov[bot] commented 1 year ago

Codecov Report

Merging #217 (52d0460) into master (a37721c) will not change coverage. The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #217   +/-   ##
======================================
  Coverage    3.16%   3.16%           
======================================
  Files          90      90           
  Lines        3697    3697           
  Branches      657     657           
======================================
  Hits          117     117           
  Misses       3575    3575           
  Partials        5       5           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

dwmkerr commented 1 year ago

Another great addition thank-you!