Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text is shifted between computers #25

Closed
wbrenna opened this issue Sep 10, 2013 · 6 comments
Closed

Text is shifted between computers #25

wbrenna opened this issue Sep 10, 2013 · 6 comments
Labels

Comments

@wbrenna
Copy link
Contributor

wbrenna commented Sep 10, 2013

The text gets shifted between different computers; I suspect a small bug due to the screen resolution. Also, sometimes written strokes differ in location with respect to text.

@andreasb242
Copy link
Contributor

How much? Can you add a screenshot?

Which background? PDF or Xournal background?

@wbrenna
Copy link
Contributor Author

wbrenna commented Sep 10, 2013

It's usually just a small amount. In the slide below there is a Mathtex equation as well as two Text instances. This effect is amplified by having a long instance of Text.

xournalpp_textmisalignment

@wbrenna
Copy link
Contributor Author

wbrenna commented Oct 10, 2013

I think this is likely similar to bug that exists in Xournal. Fortunately, Denis has it explained:
https://sourceforge.net/p/xournal/discussion/554377/thread/bfb88bd9/?limit=25#57eb
https://sourceforge.net/p/xournal/bugs/111/

Unfortunately he is not convinced it can be readily fixed. Evidently it's due to rounding problems in libgnomecanvas for Xournal. I checked the obvious thing for us - Xournalpp uses doubles for XojFont sizes, so it must be something deeper for us.

Attached is an example of the problem in the original Xournal, with the Xournal document and the PDF shown together. That said, Xournalpp does not exhibit the same behaviour. On Xournal, zooming in makes the rounding negligible, and eventually results in something that is faithful to the PDF export. On Xournalpp, zooming does not make a difference. This gives me a some hope that it can be fixed in Xournalpp.

pdfvsdocument

@wbrenna
Copy link
Contributor Author

wbrenna commented Oct 11, 2013

I think the text shifting might be due to the use of absolute Pango font sizing in TextView.cpp. A sizing relative to DPI might prevent that problem; I'm testing it now.

The text shift in PDF looks to be caused by something else. For all I know this could be due to some font-rounding problem in poppler - it seems correct to use "true" in TextOutputDev instantiation in XojPopplerPage. But I might test some changes here too.

@wbrenna
Copy link
Contributor Author

wbrenna commented Feb 7, 2014

I believe I've fixed this in commit eb9d526. However, it crashes on some of my computers and I'm not sure why. I will leave it in unless I get complaints (in glib_new it works fine - I'm assuming because it might be a thread race condition for the settings file that was fixed by all the thread improvements in recent glib versions). Use the preferences file to match the DPI on all of your computers and this should make the spacing behave.

@wbrenna wbrenna closed this as completed Feb 7, 2014
@wbrenna
Copy link
Contributor Author

wbrenna commented Feb 7, 2014

I think I fixed the crash with a better static int for the DPI (it's only reloaded on restart of Xournalpp).

@wbrenna wbrenna removed this from the Xournalpp 1.0 milestone May 17, 2014
@yasmah74 yasmah74 mentioned this issue May 18, 2023
@Samanbaia Samanbaia mentioned this issue Jul 22, 2023
@opaluja opaluja mentioned this issue Aug 3, 2023
@bmany bmany mentioned this issue Aug 4, 2023
@thdngan thdngan mentioned this issue Aug 6, 2023
@rostur rostur mentioned this issue Aug 16, 2023
@rschram rschram mentioned this issue Oct 26, 2023
@majorace majorace mentioned this issue Apr 9, 2024
@01-1 01-1 mentioned this issue Apr 20, 2024
@IlyaSulli IlyaSulli mentioned this issue May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants