View Bug Details

IDProjectCategoryView StatusLast Update
0001291DCP-o-matic[All Projects] Bugspublic2019-02-02 00:18
ReporterCarstenAssigned Tocarl 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform64 bitOSWindowsOS Version7
Product Version2.12.x 
Target Version2.14.0Fixed in Version 
Summary0001291: Disable ClearType subpixel font smoothing in WIN7/8/10 versions
Description

It appears that in WIN7/8/10, DCP-o-matic uses Windows' ClearType function to smooth/antialias fonts.
However, ClearType utilizes different techniques for font smoothing, among them one that creates miscoloration around font edges.
It is caused by ClearType using RGB supixel rendering.

https://en.wikipedia.org/wiki/ClearType

It is possible to adjust ClearType in Windows globally so that RGB subpixel rendering is not used, only general font smoothing.
http://www.thewindowsclub.com/disable-font-smoothing-windows

Maybe there is a way to set this behaviour for DCP-o-matic, so that only font smoothing is used, but not subpixel rendering?

Discussion here: https://dcpomatic.com/forum/viewtopic.php?f=2&t=1084&p=4207#p4207

  • Carsten
TagsNo tags attached.
Estimated work requiredUnknown

Activities

Carsten

2018-05-07 12:29

manager  

font_coloring.jpg (58,356 bytes)
font_coloring.jpg (58,356 bytes)

carl

2018-09-05 00:30

administrator   ~0002656

Cairo::ANTIALIAS_NONE seems like it might improve things.

carl

2018-09-29 21:39

administrator   ~0002707

Last edited: 2018-09-29 21:41

View 4 revisions

From the forum thread:

  • this seems to be Windows only
  • Anders says that disabling ClearType seems to solve the problem, but then 2.9.21 is maybe a little nicer looking than 2.12.4

2.13.22 did

context->set_antialias (Cairo::ANTIALIAS_GRAY);
Cairo::FontOptions fo;
context->get_font_options (fo);
fo.set_antialias (Cairo::ANTIALIAS_GRAY);
context->set_font_options (fo);

But this apparently doesn't help at all.

xyzzy then adds "subs look terrible in 2.12.10 and disabling ClearType gets rid of the colouring but results in jagged edges instead"

carl

2018-09-29 22:09

administrator   ~0002708

Looking at 2.13.57 with magnifier (Windows-Key+) there is colouration in the AA.

carl

2018-09-29 22:12

administrator   ~0002709

Same version with cleartype turned off (in Windows settings) removes the colouration but it looks a bit jagged. There is some AA but not much.

carl

2018-09-30 01:55

administrator   ~0002710

Last edited: 2018-09-30 02:07

View 2 revisions

Looks like the set_font_options isn't making it to the backend; see debug branch of mxe repo; is passed into cairo_set_font_options but doesn't make it to _win32_scaled_font_create

carl

2019-01-22 23:35

administrator   ~0002915

One approach may be to use freetype as the backend on Windows; see mantis-1291 branch.

carl

2019-01-23 00:02

administrator   ~0002916

That branch merged in d702ba9f67da8a08277f83ec692bf6b90736b243

@Carsten this may be better in 2.13.105 if you could test?

Carsten

2019-01-24 01:35

manager   ~0002920

I'll check...

carl

2019-01-31 14:40

administrator   ~0003000

ping @Carsten :)

Carsten

2019-01-31 15:22

manager   ~0003002

Sorry, need some time. I have WIN7 locally available, but not WIN10. But will try to test both later today, I think the laptop at the cinema now has WIN10.

  • Carsten

carl

2019-01-31 15:28

administrator   ~0003003

No rush, I was just checking you hadn't forgotten ;)

Carsten

2019-02-01 12:46

manager   ~0003027

Last edited: 2019-02-01 12:46

View 2 revisions

Grrr.... 2.13.111 WIN10 crashes on my SRT file...

Carsten

2019-02-01 12:46

manager  

Carsten

2019-02-01 12:55

manager   ~0003028

Last edited: 2019-02-01 13:18

View 4 revisions

...because WIN10 added an invisible .txt extension to my test.srt filename. Looks as if *.txt makes DCP-o-matic crash.
...now that I fixed that, DCP-o-matic 2.13.111 hangs after adding that file, can't play for preview.
Billy Gates, I HATE YOU!!!
...switching to a WIN7 machine while that effin WIN10 notebook reboots...

Carsten

2019-02-01 13:07

manager   ~0003029

Last edited: 2019-02-01 13:08

View 2 revisions

Ah, no, I HATE YOU CARL!!! - happens in WIN7 as well (While inspecting the SRT file). Switching to a previous version, 2.13.108 I think...
This is with ONLY an SRT file loaded, no video/audio. I create a new project, add the SRT, it is detected as subtile - but any mouse action then makes the application hang and I have to force quit in both WIN7_64 and WIN10_64.

  • Carsten

Carsten

2019-02-01 13:17

manager   ~0003030

Last edited: 2019-02-01 13:55

View 2 revisions

errr. I hate you just a little bit - the 2.13.111 application is not crashing, just hangs for a few minutes while inspecting that 1 liner. Comes back with the preview afterwards. Doesn't happen in 2.13.109 OS X.

I have attached my SRT file, maybe you can check.



Test.srt (89 bytes)

Carsten

2019-02-01 13:53

manager   ~0003031

Last edited: 2019-02-01 20:22

View 3 revisions

Alright, did tests with 2.13.111 in both WIN10 and WIN7 with CT enabled and disabled in system prefs.
Wanted to confirm by creating the same DCP with 2.12.18 and CT enabled (which should show the colored edges).

Strange - because serifs show issues better, I used timesbd.ttf in the tests with 2.13.111. When I try the same with 2.12.18, (assigning timesbd.ttf), the font in preview does not change (remains ARIAL), and also not in the DCP created. It does change in 2.13.111, though...
So, maybe there is a bug in 2.12.18 with the font assignment. Will check later.

WHATEVER - I can still see the slightly colored edges with the ARIAL font used by 2.12.18.
I will upload the resulting pics later, but as far as I can see, all the DCPs created with 2.13.111 only show greytone antialiasing, no matter wether ClearType had been disabled in system prefs or not.

Long story short - for now, looks as if this is solved in 2.13.111.

  • Carsten

Carsten

2019-02-01 14:33

manager   ~0003032

Last edited: 2019-02-01 20:23

View 2 revisions

pfff... those f***** pixel peepers - when I play these DCPs on our 10m screen, the convergence error of our 4k Sony is in the same range as the ClearType artifacts (around one pixel)... I don't see the color fringing created with 2.12.18 from around 2m distance anymore...and what I see, I have no idea wether it is caused by convergence or ClearType...

Maybe get back to those who brought up the issue in the first place and see wether they are satisfied, now that they wasted yours and my time ;-)

Carsten

Carsten

2019-02-01 21:30

manager   ~0003033

Here's the results:



carl

2019-02-01 21:35

administrator   ~0003034

OK, thanks, I guess that's an improvement. The "fix" is to use freetype rather than cleartype to render the fonts. The delay you saw is fontconfig (required by freetype) creating its caches. I'm just trying to move that delay to program startup (it should only happen once).

Carsten

2019-02-01 21:38

manager   ~0003035

Last edited: 2019-02-01 22:19

View 3 revisions

Right. But the color fringing in my opinion is not nearly visible in real applications. Only when you play back the DCP on a computer and zoom in heavily...

But - it seems there is indeed an issue in 2.12.18 and some earlier not using the assigned font for burn-in - currently downloading the Mac version to see wether I can reproduce it...

Carsten

2019-02-01 22:32

manager   ~0003036

Hmm, that's frustrating, I do not get 2.13.111 OS X to use a TTF font that I assign in the subtitle tab. Whatever font I assign, preview doesn't change. I tried the same timesroman file that I used to create the above screenshots in windows, where it works as expected in 2.13.111.
Both 2.12.x and 2.13.111 in OS X render preview and DCP with a sans serife. When I disable burn in, the chosen font is copied to the subtitle UUID folder.

  • Carsten

carl

2019-02-01 22:56

administrator   ~0003037

Yes I'm seeing that in 2.13.111. Maybe it's never worked?

Carsten

2019-02-01 23:16

manager   ~0003038

Last edited: 2019-02-01 23:24

View 2 revisions

It must have worked at some point in time, I did that short with a chinese font. Although, I remember I had to use font compressor, and may have done the rest of that project then in WIN as well...

As I said on numerous occasions earlier - personally, I don't care much about subtitle appearance, as long as I am confident about readability. Any standard sans-serif suits me just fine.

  • Carsten

Carsten

2019-02-01 23:20

manager   ~0003039

Last edited: 2019-02-01 23:34

View 7 revisions

Another issue is that, other than in earlier OS (X?) versions, my font folder only shows some very few TTF font files now. I just googled for it, and it seems OS X is now using a different method to store fonts/ttf. There are converters, but, as a matter of fact, when I just try to find 'a different' font, all I'm offered is stuff like Zapf Dingbats and Apple Braille ;-) I'm glad I put that times roman ttf font file from my afternoon tests into my dropbox.

Fine. So, at least that ClearType color fringing issue helped me dig up a REAL bug ;-) Cheers me up a bit.

  • Carsten

carl

2019-02-02 00:18

administrator   ~0003040

I've now allowed .otf as well as .ttf. Hopefully that will be sufficient...

Bug History

Date Modified Username Field Change
2018-05-07 12:29 Carsten New Bug
2018-05-07 12:29 Carsten Status new => assigned
2018-05-07 12:29 Carsten Assigned To => carl
2018-05-07 12:29 Carsten File Added: font_coloring.jpg
2018-05-07 12:31 Carsten Description Updated View Revisions
2018-05-07 14:12 Carsten Description Updated View Revisions
2018-09-05 00:30 carl Note Added: 0002656
2018-09-29 21:39 carl Note Added: 0002707
2018-09-29 21:39 carl Note Edited: 0002707 View Revisions
2018-09-29 21:39 carl Note Edited: 0002707 View Revisions
2018-09-29 21:41 carl Note Edited: 0002707 View Revisions
2018-09-29 22:09 carl Note Added: 0002708
2018-09-29 22:12 carl Note Added: 0002709
2018-09-30 01:55 carl Note Added: 0002710
2018-09-30 02:07 carl Note Edited: 0002710 View Revisions
2018-10-17 09:38 carl Priority normal => high
2019-01-22 23:35 carl Note Added: 0002915
2019-01-23 00:02 carl Status assigned => feedback
2019-01-23 00:02 carl Note Added: 0002916
2019-01-24 01:35 Carsten Note Added: 0002920
2019-01-24 01:35 Carsten Status feedback => assigned
2019-01-31 14:40 carl Note Added: 0003000
2019-01-31 15:22 Carsten Note Added: 0003002
2019-01-31 15:28 carl Note Added: 0003003
2019-02-01 12:46 Carsten Note Added: 0003027
2019-02-01 12:46 Carsten Note Edited: 0003027 View Revisions
2019-02-01 12:46 Carsten File Added: Bildschirmfoto 2019-02-01 um 13.44.30.png
2019-02-01 12:55 Carsten Note Added: 0003028
2019-02-01 12:56 Carsten Note Edited: 0003028 View Revisions
2019-02-01 13:07 Carsten Note Added: 0003029
2019-02-01 13:08 Carsten Note Edited: 0003029 View Revisions
2019-02-01 13:17 Carsten File Added: Test.srt
2019-02-01 13:17 Carsten Note Added: 0003030
2019-02-01 13:17 Carsten Note Edited: 0003028 View Revisions
2019-02-01 13:18 Carsten Note Edited: 0003028 View Revisions
2019-02-01 13:53 Carsten Note Added: 0003031
2019-02-01 13:55 Carsten Note Edited: 0003030 View Revisions
2019-02-01 14:33 Carsten Note Added: 0003032
2019-02-01 20:22 Carsten Note Edited: 0003031 View Revisions
2019-02-01 20:22 Carsten Note Edited: 0003031 View Revisions
2019-02-01 20:23 Carsten Note Edited: 0003032 View Revisions
2019-02-01 21:19 Carsten File Added: 2_12_18_WIN7_ClearType_ON.png
2019-02-01 21:19 Carsten File Added: 2_13_111_WIN7_ClearType_ON.png
2019-02-01 21:19 Carsten File Added: 2_13_111_WIN10_ClearType_OFF.png
2019-02-01 21:19 Carsten File Added: 2_13_111_WIN10_ClearType_ON.png
2019-02-01 21:19 Carsten File Added: 2_13_111_WIN7_ClearType_OFF.png
2019-02-01 21:28 Carsten File Deleted: 2_12_18_WIN7_ClearType_ON.png
2019-02-01 21:28 Carsten File Deleted: 2_13_111_WIN7_ClearType_ON.png
2019-02-01 21:29 Carsten File Deleted: 2_13_111_WIN10_ClearType_OFF.png
2019-02-01 21:29 Carsten File Deleted: 2_13_111_WIN10_ClearType_ON.png
2019-02-01 21:29 Carsten File Deleted: 2_13_111_WIN7_ClearType_OFF.png
2019-02-01 21:30 Carsten File Added: 2_12_18_WIN7_ClearType_ON.png
2019-02-01 21:30 Carsten File Added: 2_13_111_WIN10_ClearType_ON.png
2019-02-01 21:30 Carsten File Added: 2_13_111_WIN10_ClearType_OFF.png
2019-02-01 21:30 Carsten File Added: 2_13_111_WIN7_ClearType_ON.png
2019-02-01 21:30 Carsten File Added: 2_13_111_WIN7_ClearType_OFF.png
2019-02-01 21:30 Carsten Note Added: 0003033
2019-02-01 21:35 carl Note Added: 0003034
2019-02-01 21:38 Carsten Note Added: 0003035
2019-02-01 21:39 Carsten Note Edited: 0003035 View Revisions
2019-02-01 22:19 Carsten Note Edited: 0003035 View Revisions
2019-02-01 22:32 Carsten Note Added: 0003036
2019-02-01 22:56 carl Note Added: 0003037
2019-02-01 23:16 Carsten Note Added: 0003038
2019-02-01 23:20 Carsten Note Added: 0003039
2019-02-01 23:22 Carsten Note Edited: 0003039 View Revisions
2019-02-01 23:24 Carsten Note Edited: 0003038 View Revisions
2019-02-01 23:24 Carsten Note Edited: 0003039 View Revisions
2019-02-01 23:25 Carsten Note Edited: 0003039 View Revisions
2019-02-01 23:25 Carsten Note Edited: 0003039 View Revisions
2019-02-01 23:30 Carsten Note Edited: 0003039 View Revisions
2019-02-01 23:34 Carsten Note Edited: 0003039 View Revisions
2019-02-02 00:18 carl Status assigned => resolved
2019-02-02 00:18 carl Resolution open => fixed
2019-02-02 00:18 carl Note Added: 0003040