Comments (2)
Scaling the font via the modelView
matrix is the way to do it.
Try centering your text at the origin, then scaling it and translating it with the modelView
matrix, e.g.:
dp.Print(text, Vector3.Zero, QFontAlignment.Left);
dp.ModelViewMatrix = Matrix4.CreateScale(2) * Matrix4.CreateTranslation(pos);
Otherwise the scale matrix will be applied assuming the origin is at 0, so the whole font will be scaled away from the origin (assuming a positive scale factor)
from quickfont.
Thanks. My issue ended up being the position argument to the print method was also being scaled by the ModelView matrix. It might be useful to add a Print overload that takes a transformation matrix as an argument instead of Vector3 for the position (to apply translation, rotation, and scaling all at once).
from quickfont.
Related Issues (20)
- Font rendering technique description in README HOT 1
- Stop using System.Drawing HOT 1
- Switch to using a FAKE build script
- Upload a Strong Name signed version of QuickFont to nuget HOT 1
- Resolution independent text rendering HOT 1
- Inlcuded Examples do not work, some form of Documentation required HOT 9
- Using Quickfont in drawing environment HOT 2
- When attempting to draw text, another object fails to render.
- Problem using quickfont in immediate mode application. HOT 2
- Chinese font seams doesn't work HOT 9
- Crash HOT 3
- Update to OpenTK 3.0.1 HOT 2
- Maintaining same size for the text HOT 2
- NaturallyMonospaced fonts not rendering HOT 4
- Is it possible to support Chinese rendering? HOT 3
- Variable size font HOT 3
- How show graph and text on GLControl ? HOT 1
- Library can only be disposed once per application instance HOT 3
- QFontDrawing.Print Reliant on outdated OpenTK Bindings. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickfont.