View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006323 | Spring engine | General | public | 2019-10-17 00:52 | 2019-10-19 23:22 |
| Reporter | lhog | Assigned To | Kloot | ||
| Priority | low | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 104.0 +git | ||||
| Fixed in Version | 104.0 +git | ||||
| Summary | 0006323: Similar font:Print() calls rendered a bit differently on maintenance and develop | ||||
| Description | I'm examining issue when some of the printed text end up being off for similar font:Print() calls on maintenance and develop. In particular there is a line that draws certain text ("Settings") along with Echo debug in a widget: Spring.Echo(title, x-bgMargin+(titleFontSize*0.75), y+bgMargin+8, titleFontSize, "on") font2:Print(title, x-bgMargin+(titleFontSize*0.75), y+bgMargin+8, titleFontSize, "on") A LOG() call in maintenance: if (text == "Settings") LOG("x=%f, y=%f, sizeX=%f, sizeY=%f, text=%s", x, y, sizeX, sizeY, text.c_str()); And a LOG() call in develop: if (text=="Settings") LOG("x=%f, y=%f, sizeX=%f, sizeY=%f, text=%s", x * globalRendering->screenSizeX, y * globalRendering->screenSizeY, sizeX * globalRendering->screenSizeX, sizeY * globalRendering->screenSizeY, text.c_str()); Both LOG calls happen right before the RenderString{Outlined, Shadow, ""} block in the CglFont::glPrint() method. Here's what I get from the LOGs: Develop (note: actual x, y, xSize, ySize are scaled back to the screen resolution in the LOG() call): [f=0000212] [Font] x=794.099976, y=793.689209, sizeX=18.000000, sizeY=17.999998, text=Settings Maintenance: [f=0002152] [Font] x=794.099976, y=793.689209, sizeX=18.000000, sizeY=18.000000, text=Settings As can be seen both calls look identical, give or take small precision difference. However the end result is quite different. Comparing the two images, it looks like if the develop rendering happens in a bit smaller than actual rendering pane (screenshots are to follow). | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | Yes | ||||
|
|
as explained before, the DrawScreen callin sets up a perspective projection which affects text rendering in maintenance (through the FFP stack) but not in develop. you can use font:SetText{View,Proj}Matrix to correct for this in your wrapper, NCR on the engine side. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2019-10-17 00:52 | lhog | New Issue | |
| 2019-10-17 00:53 | lhog | File Added: BAR_settings_develop.jpg | |
| 2019-10-17 00:53 | lhog | File Added: BAR_settings_maintenance.jpg | |
| 2019-10-19 23:22 | Kloot | Assigned To | => Kloot |
| 2019-10-19 23:22 | Kloot | Status | new => closed |
| 2019-10-19 23:22 | Kloot | Resolution | open => no change required |
| 2019-10-19 23:22 | Kloot | Fixed in Version | => 104.0 +git |
| 2019-10-19 23:22 | Kloot | Note Added: 0020202 |