Open koo9 opened 2 years ago
Turned out the lineheight ratio is treated differently in linux and windows. if LineHeight = 1.2f in widows, it's approximately 1.4f in linux. so the pdf generated in linux does not look the same as that in windows. (great library for genrating pdf BTW).
@kyugoa This is strange... I am using the SkiaSharp API to extract the LineHeight property from the font file. I suspect that fonts registered within operating systems (Linux vs Windows) have different values for LineHeight property. And this is the root cause of the not consistent results.
What you can try: include the font file with your project (as a separate file or as an embedded resource) and then load the file using the FontManager API.
that's what I did, I include the font files and register them on startup. seeing different lineheights from windows and linux. could it be the two operating systems treat lineheight differently from the font file?
If you have loaded the font from a specific file, I doubt that this is connected to the operating system. This looks like a SkiaSharp bug. Notice: SkiaSharp uses different native assets dependending on the OS. Maybe there are some subtle differences?
that make sense. will find out if there is an existing bug logged on Skiasharp. thx
There is one more active issue with very similar problem. This is the proof that we are not mad 😅
If the newest SkiaSharp version (2.88.x) does not work, would you like to create a bug report on the SkiaSharp repository?
do you mean this issue? https://github.com/mono/SkiaSharp/issues/838 looks like it's logged a few years back but it's still not addressed.
Did you find a solution to this problem? Having the same problem with mac vs Linux @kyugoa
no, looks like the bug is not addressed, what you can do is to adjust the line height with a ratio for Linux (by trial and error)
Describe the bug Lineheight is not respected when running in linux
To Reproduce Compare the generated pdf in windows and linux.
Expected behavior Lineheight should be the same when generated in linux
Screenshots https://1drv.ms/u/s!Atfkc5kdKg4AokWlPcMTN_CVliZs?e=c3dw8g
Additional context running the app in kubernetes container in linux