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

Lose the space after the period. #1463

Closed
mcrislip opened this issue Jun 11, 2023 · 16 comments
Closed

Lose the space after the period. #1463

mcrislip opened this issue Jun 11, 2023 · 16 comments
Labels
bug Issue: Something isn't working dependency Issue: Package dependency packaging Component: Packaging and installing

Comments

@mcrislip
Copy link

mcrislip commented Jun 11, 2023

I do most of my writing on Linux/Zorin 16.2. Occasionally I need to use a mac (ventura 13.4). Both have the same, most recent version of NovelWriter.

I just noted that on the mac side, all the single spaces after a period and comma are gone.

They are maintained on the linux side. On the mac, after you type a period or comma, then space, and start the next word, the space goes away. However, on the linux side the space is there. And if you correct the problem in the mac side so you see a single space after a period or comma, you get two spaces on the linux side. Kind of odd.

@mcrislip mcrislip added the bug Issue: Something isn't working label Jun 11, 2023
@vkbo
Copy link
Owner

vkbo commented Jun 11, 2023

There was a similar issue reported before, and then it was a font issue. In either case, the text editor itself is provided by the Qt library, so and I don't control the rendering of the text itself.

Could you try switching editor font on novelWriter on the Mac?

@mcrislip
Copy link
Author

mcrislip commented Jun 13, 2023 via email

@vkbo
Copy link
Owner

vkbo commented Jun 14, 2023

This is strange then. In the past, rendering issues have been due to certain fonts and font kerning. I doubt there is anything wrong with the actual files. Everything is just plain text, with no rich text overlay aside from the syntax highlighter. But you can just in case check the files in the content subfolder of your project. They are plain text files, so you can open them in another app on the mac and have a look.

If there is indeed some rendering issue on the mac, it is in any case likely in the QTextEdit widget of the Qt library. I don't hook into that layer of functionality from the novelWriter code, as that would be far too slow from Python. I have a VM with macOS Catalina, and can check there, just in case.

@mvdkleijn
Copy link
Contributor

Considering that the OP stated that the problem is only there on Mac and Linux is fine, we can safely assume that the NovelWriter files are fine.

Indeed, like this sounds more like a rendering issue of bug in the Mac version of the QT component.

@vkbo
Copy link
Owner

vkbo commented Jun 17, 2023

Well, I gave it a test by coying over a project on Linux to the macOS Catalina VM with rsync, and opened it. I could not reproduce the problem. Everything looked fine.

@saikyun
Copy link

saikyun commented Jun 20, 2023

I have the same problem. As far as I can tell, it's not about the font, because the space is literally gone. I was thinking that it might be some sort of autocorrect, though I have no clue as to what sort that might be.

EDIT: NVM, copying from novelwriter to Notes causes the spaces to appear. So yeah, rendering issue it is.

According to this issue, it seems to affect QT 5 but not 6. Does novelWriter use QT 5?

@vkbo
Copy link
Owner

vkbo commented Jun 20, 2023

There is no autocorrect that edits text unless you're actively typing. There are also no part of novelWriter that hooks into the Qt text rendering process, as mentioned. This is very likely to be a Qt issue, and yes, novelWriter runs on Qt5.

Do you have a link to a bug report?

If there is a version of Qt 5 where this is fixed, I can make a new release for MacOS using that instead.

@vkbo vkbo added dependency Issue: Package dependency packaging Component: Packaging and installing labels Jun 20, 2023
@saikyun
Copy link

saikyun commented Jun 26, 2023

Oh, sorry, I thought I pasted the link. Here: https://bugreports.qt.io/browse/QTBUG-88495

@vkbo
Copy link
Owner

vkbo commented Jun 26, 2023

Thanks! Interesting that it's reported for Catalina, which I couldn't reproduce. There's not much I can do to solve it other than check which patch version of Qt5.15 they eventually fix it for, and make sure the DMG releases are using that version. That's dependant on the PyQt5 releases on Conda though, which the Mac DMG release of novelWriter depends on.

@saikyun
Copy link

saikyun commented Jun 29, 2023

Oh, I tried changing font, and that solved it for me. I wonder now, the default setting is something like AppleUISystemFont or similar. Maybe that is acting weird in some way?

@vkbo
Copy link
Owner

vkbo commented Jun 29, 2023

That should be the default for the GUI, but not for the editor. For MacOS it should default to Courier, but if that's not available, it will default to the UI font, yes.

@saikyun
Copy link

saikyun commented Jul 7, 2023

I don't have Courier on my machine, but I do have Courier New.

@vkbo
Copy link
Owner

vkbo commented Jul 7, 2023

That may explain why it falls back to the UI font, yes. I tested the implementation on MacOS Catalina, and had Courier there, so that's what I set as default. A solution here would be to provide a few font options. It's not a problem for novelWriter to iterate through a few to pick one before it falls back to the UI font. Feel free to post suggestions here. They should be generally available on MacOS and be fairly standard. Like whatever Safari, word processors, or whatever, would pick as defaults.

@vkbo vkbo mentioned this issue Jul 19, 2023
6 tasks
@vkbo
Copy link
Owner

vkbo commented Jul 19, 2023

I'm changing the default font on MacOS to Helvetica. Can you confirm if changing the font works, @mcrislip? I know you initially said it didn't, but since it worked for others, maybe you've tried some more fonts? Make sure you change the font under Preferences -> Documents, and not the GUI font.

@mcrislip
Copy link
Author

mcrislip commented Jul 20, 2023 via email

@vkbo
Copy link
Owner

vkbo commented Jul 30, 2023

I'm closing this now. We can always reopen it if the issue remains.

@vkbo vkbo closed this as completed Jul 30, 2023
@vkbo vkbo added this to the Release 2.1 Beta 1 milestone Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue: Something isn't working dependency Issue: Package dependency packaging Component: Packaging and installing
Projects
None yet
Development

No branches or pull requests

4 participants