Closed KlasO closed 2 years ago
The pinch-zoom has been tuned somehow due to that it was too sensitive as mentioned in #141
What exact :ifont-set
command have you tried?
Pinch zoom does not work at all. I have tried ifont set and tried to change font size but when I hit Save it does not save the size change. It changes the font (if e.g. changing from Menlo to Source Code Pro). When Save is clicked, it shows a 'pop-up' in the top left corner with the fone name and size 14.0. Enabling the switch 'Update in Realtime' only results in the size parameter not being possible to change. I have also tried ifont set -s 24 that also doesn't work.
This is weird.
Could you try to set the option 'guifont' directly like this: :set guifont=Source\ Code\ Pro:h20
, then check whether it was changed successfully: :echo &guifont
?
The character size is changed when issuing :set guifont=Source\ Code\ Pro:h20
.
When pinch-zooming, the font size shown when pinching - e.g. pinching to size 36 just to test results in echoed Source Code Pro:h36.0 but the screen font size stays at 22.
EDIT: Manual workaround for now is to add :set guifont=Source\ Code\ Pro:h24 in .vimrc
I have the same problem.
@KlasO I have made some changes concerning this issue and pushed it to TestFlight. It should be available soon. Please give it a try to see whether it solves this problem.
@terrychou I just downloaded and tested 2.46(1)
@KlasO Please tell me the value of 'guifont' (via :echo &guifont
) after each attempt (:ifont set
or GUI way) to change the size.
Also, after a failure, try and run :redraw!
to see what happens.
@terrychou After pinch-zoom: :echo &guifont
results in Menlo:h34.0; issuing :redraw!
makes no difference either to font size or echo result
After :ifont set
: :echo &guifont
shows Source Code Pro:h20.0:b:1 (yes, I picked another font name as well) but no change in the displayed font. :redraw!
makes no difference.
@KlasO do you mean that the value of option 'guifont' did change to the target size, e.g. ":h34.0", ":h20.0" in the above examples but the displayed font never change, i.e. it stays 14.0?
@terrychou Correct, the variable changes but the screen font size does not change.
@KlasO there is a strange part :b:1
in your example. Are you using any plugins? Could you disable them to see whether it is different?
I have made some more changes against this issue according to our discussion so far and pushed it (2.46(2)
) to TestFlight. Please give it a try.
@terrychou I have:
@KlasO the problem to me is that I cannot reproduce this issue at my end (on device or in simulators). Therefore I can only guess what may be the cause but I haven't got it so far obviously.
Could you make a screen recording of you reproducing all these operations on your device? So that I could have more intuitive ideas and may get some hints from it. (Here is how to screen recording on your device: https://support.apple.com/en-us/HT207935)
@terrychou attached please find screen recording per your request https://user-images.githubusercontent.com/26037930/147824600-fd927fba-b260-471b-9297-0bbe620d643a.mp4
@KlasO did you have this issue with the old font management system (prior to version 2.45)? If you are not sure, you can have a try in TestFlight and install a build of version 2.44 from "Previous Builds".
@terrychou Going back to 2.44(1) pinch-zoom unfortunately doesn't work either. :ifont set 1 24
does work though.
I don't recall exactly how I had it set up before 2.45 (I had probably issued something like :ifont set 4 24
and it stuck from session to session), but as far as I can tell, I detected the issue when installing 2.45 and the screen font was suddenly 14pt (and ifont set no longer working).
@KlasO I have made some changes to the font set command according to your comparison between the old and new system, and pushed version 2.46(3) to TestFlight. Please give it a try.
@terrychou I tried the 2.46/3) but neither ifont set and save from the gui nor pinch-zoom works. Set guifont still works.
@KlasO please tell me more details.
What exact font set command did you execute? Did they change the option 'guifont' values successfully? What were they? Can they change the font?
Also, do you enable notifications in iVim? If not, please enable it since the font management would notify you with useful information.
After each font (or size) change attempt, please open the font settings view again and tell me the readings in it.
Also, if the size failed to change, please issue a command :redraw!
(maybe make several in a row) to see what happens.
@terrychou I don't work as a software tester, but I still try to be methodical so I've done the same thing when testing. (I can't vouch for having done the exact same steps, in the exact same order each time, but again, I'm don't work with software testing).
1) Open iVim and comment out set guifont=Source\ Code\ Pro:h24
in ~/.vimrc; save and :q
2) echo &guifont
; result= "Source Code Pro: h24 3) Reload iVim; result: font in 14pt 4) Try to increase font by pinch-zooming; the bubble in the top left corner shows
Source Code Pro: 24.0, and when release the fingers, no change, ie still 14pt. 5)
echo &guifontresults in Source Code Pro:h36.0 shown on the message line 6)
:redraw!issued two times - no change; 7)
ifont setwithout parameters; GUI dialogue; change to 24pt and click Save; no change, still 14pt 8)
echo &guifontresults in Source Code Pro:h24.0:b:1 9)
:redraw!issued two times - no change; ie still 14pt. and &guifont still shows Source Code Pro:h24.0:b:1 Throughout these steps, I have checked the
:ifont set` dialogue, and the only change that takes effect is changing the typeface, e.g. from Source Code Pro to Menlo; see attachment.
@KlasO thanks for the details. According to them, I have rewritten the UI font updating part and pushed it (2.46(4)) to TestFlight. Please have a look.
@terrychou unfortunately no success,
:echo &guifont
- Source Code Pro:h35.0 is shown:redraw!
twice - no change, and still shows Source Code Pro:h35.0:Ifont set
:redraw!
twice, no change@KlasO could you try and open iVim without loading anything like this?:
:qa
first;-u NONE
into "Arguments";@terrychou certainly, tried that and still no luck. I tried both pinch-zoom and ifont set but only thing that works is changing the typeface, i.e. from Source Code Pro to Menlo.
@KlasO does the :set guifont=...
work in this build?
I have some ideas:
tar
to tarball your documents and move the tarball to somewhere else in the Files.app). If it is too risky to you, just never mind. @terrychou :set guifont
works
1) I did test an earlier build on an iPad mini where I had no previous installation of iVim, but does not work.
2) Certainly, I deleted the app and installed fresh from TestFlight
Test results:
t1) pinch zoom, does not change screen font size, echo &guifont
shows the pt size after the pinch-zoom, redraw!
makes no difference.
t2) :ifont set
and change font in the GUI does not change screen font size, echo &guifont
shows the pt size after the GUI Save, this time with :b:i appended. :redraw!
makes no difference.
@terrychou Unsure if it makes a difference, but I stumbled upon it: I can use :set guifont=Menlo:h24
and that works, but when I tried :set guifont=Menlo:h24.0
it does NOT work. I don't know why I tried, but the bubble after pinch-zoom shows the pt size as a float (e.g. 24.0) whereas the only working way of :set guifont
seems to be an integer.
@KlasO this is interesting. I will have a look at the code again to see what I can do.
@KlasO I have made some more changes concerning this issue and pushed it (2.46(5)
) to TestFlight, please do the following:
First, please ensure that:
-u NONE
mode as mentioned above.Then do the following testings:
:ifont +
:ifont -
:ifont set me* -s 20
:ifont set -s 40
For each above attempt, if the size failed to change as expected, please record the following info and let me know:
:echo &guifont
);:ifont ls
, record the line starting with ">".Also let me know any notifications come up during the testing.
@terrychou below please find my test results. On a side note (and a true first-world problem), it is very inconvenient that it isn't possible to copy text from the screen when documenting echo results such as now.
Tests
:ifont +
echo &guifont
= Menlo:h15.0
:ifont ls
Apple Color Emoji (r]
Courier New (r,b,i, bi]
Menlo (r:r,b,i,bi] 14.0
Source Code Pro [r,b,i]:ifont -
echo &guifont
= Menlo: h13.0
:ifont ls
Apple Color Emoji (r]
Courier New (r,b,i, bi]
Menlo (r:r,b,i,bi] 14.0
Source Code Pro [r,b,i]:ifont set me* -s 20
echo &guifont
= Menlo:h20.0
:ifont ls
Apple Color Emoji (r]
Courier New (r,b,i, bi]
Menlo (r:r,b,i,bi] 14.0
Source Code Pro [r,b,i]:ifont set -s 40
echo &guifont
= Menlo:h40.0
:ifont ls
Apple Color Emoji (r]
Courier New (r,b,i, bi]
Menlo (r:r,b,i,bi] 14.0
Source Code Pro [r,b,i]:ifont set
increase size, not realtime
echo &guifont
= Menlo:h25.0:b:i
:ifont ls
Apple Color Emoji (r]
Courier New (r,b,i, bi]
Menlo (r:r,b,i,bi] 14.0
Source Code Pro [r,b,i]:ifont set
increase size, realtime enabled ,
echo &guifont
= Menlo:h15.0:b:i
:ifont ls
Apple Color Emoji (r]
Courier New (r,b,i, bi]
Menlo (r:r,b,i,bi] 14.0
Source Code Pro [r,b,i]@KlasO Please try the following:
:set guifont=...
, then invoke the shortcut to see whether it works;:set guifont=Menlo:h16.6
to see if it works.@terrychou 1) please provide the exact mapping you want me to test 2) Does not work, font bubble says 'Menlo: 14.0', and if the command is repeated, no bubble is shown
@KlasO for example, you said the :set guifont=...
is working, right?
So, please make a keyboard shortcut like this :nmap ,d :set guifont=Source\ Code\ Pro:h20<CR>
. Then invoke it in normal mode with shortcut ,d
. See whether it works.
@terrychou I issued :nmap ,d :set guifont=Source\ Code\ Pro:h20<CR>
and subsequently hit ,d and it works. The result is that the screen font is changed to Source Code Pro 20pt (which is wasn't before the command).
@KlasO I have pushed version 2.46(6) to the TestFlight, please give it a try.
No matter it works or not, please do the following:
:set guifont=Source\ Code\ Pro:h16.6
;:echo g:ivim_font_size_debug
and tell me.@terrychou
It seems to work, font is changed, and the font bubble shows 'Source Code Pro:h 16.0
:echo g:ivim_font_size_debug
displays 'none'
Edit: Pinch-zoom seems to work as well.
@KlasO build 2.46(7) is ready. It should solve this problem completely. You should now be able to set a font size with decimal part, e.g. :set guifont=Source\ Code\ Pro:h18.6
. Please have a look.
P.S. it turns out that this problem is caused by the system locale (Yours doesn't think the dot "." is part of a number.)
@terrychou I'm sorry to say that although the font resizing seems to work, the app crashes when I reopen it. I hit submit when asked if I'd like to share with the dev.
Edit: when it crashed, I deleted and reinstalled, and when that was done, I saved my .vimrc.
@KlasO what about now? which version are you using? does it still crash?
I have seen your crash report. It crashed when it was trying to load startup scripts. Was your .vimrc enabled when it crashed?
@terrychou I just reinstalled the most recent Testflight build, added my .vimrc and after that, it hangs again :(
EDIT: After that, I reinstalled the App Store version, but it still hangs. Deleting the app, and reinstalling the App Store version, and adding my .vimrc still makes the app hang.
@KlasO try and turn "Auto-restore" off of iVim in the Settings.app to see whether it helps.
Also, I have removed the total locale factor and pushed 2.46(8) to TestFlight. Please give it a try.
@terrychou
1) Install 2.46(8) (fresh install - no other version installed)
2) disable auto-restore
3) Paste .vimrc lines
4) :w .vimrc
5) :q
and restart - hangs
I have submitted two crash dumps
@KlasO can I have a look at the content of your .vimrc? The crashes seemed caused by loading it... (Please send it to me via email if you care about the privacy.)
@terrychou Please have a look here: https://github.com/KlasO/vimrc/blob/main/.vimrc
@KlasO this is a bug concerning external commands execution in scripts. I have fixed it and pushed it (2.46(9)) to TestFlight. Please give it a try.
@terrychou I have downloaded the new build and run a few tests, and all things I have tested work just fine. (Pinch-zoom, various :ifont set
, adding my .vimrc, and edited some files. I am happy with this build :)
@KlasO Great! Thanks for helping and patience. I will release it soon.
I have tried resizing the font (advanced age in combination with poor eyes) to larger than the standard 14 points but it does not change. Have tried both pinch-zoom and :ifont set but no luck