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

Add downloadable fonts (Google flav. only- OSS falls back to current system "monospace", fixes #458) #613

Closed
wants to merge 12 commits into from

Conversation

fat-tire
Copy link
Contributor

This actually adds some functionality, so please check the crap out of it. I tried to make it as compatible with #565 as I could, so that if you wanted to ALSO bundle in your own fonts beyond these downloadable ones, the code from @DAlexIV will hopefully slip right in.

Also, this was definitely working before the slew of changes added in #608 was merged. I built it again post-those changes and it still seemed to work, but wasn't tested as thoroughly.

Also-- some of the monospaced fonts (VT323 and Space Mono) kern a few letter combos like "ff" or "fi" which narrow the space used and it's not quite monospace any more and that screws up Connectbot's backspacing. I looked briefly for ways to ignore kerning hints (there's a deprecated attribute/method) in that Paint object and it still looks possible, but I didn't explore too much. For now those two fonts are commented out.

Anyway seems to work okay. Please try it!

Here are those chromebook images again. Works great in Chrome OS. If I think of anything else to add i'll do so.

Again, thanks to @DAlexIV who got this started before the move to minsdk 14 made the downloadable part possible.

ft

@CLAassistant
Copy link

CLAassistant commented May 27, 2018

CLA assistant check
All committers have signed the CLA.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running checkstyle failed with:

com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to parse configuration stream

Ensure your config file exists and is valid XML.

@fat-tire fat-tire changed the title Add downloadable fonts (Google build only- OSS build falls back to current system "monospace", Fixes #458) Add downloadable fonts (Google flav. only- OSS falls back to current system "monospace", fixes #458) May 27, 2018
@kruton
Copy link
Member

kruton commented May 27, 2018 via email

@fat-tire
Copy link
Contributor Author

Sure...I think you're talking about this, no?

<meta-data android:name=
     "WindowManagerPreference:SuppressWindowControlNavigationButton"
     android:value="false" />

Do you want this backspace protection on all activities? Override onBackButtonPressed() everywhere too?

ft

@kruton
Copy link
Member

kruton commented May 28, 2018

Yes, that's the video I was thinking of.

We want onBackButtonPressed if it makes sense, but I'm not sure where onBackButtonPressed is called from (from onKey somehow?). We might already intercept it through some other route in ConsoleActivity.

@fat-tire
Copy link
Contributor Author

I'll take a look-- I don't think the current Samsung Pro (my CB) is honoring the manifest flag yet though so it makes it kind of hard to test/confirm it's working. Let me play with it a bit.

Also, I was thinking-- having multiple windows to permit more than one connection at a time might be cool. That's just a thought-- i haven't tried it yet. Off the top of your head, do you see any situation in which having more than one active session active in a window simultaneoulsy might confuse things?

@fat-tire
Copy link
Contributor Author

fat-tire commented Jun 1, 2018

Just following up-- did a ChromeOS update yesterday and the double-back arrows persist even on Google apps like the Play Store.. When the manifest settings are recognized by my CB and I can confirm everything works, I'll submit the changes as a separate PR.

@@ -99,6 +100,8 @@
public final static int DEFAULT_FG_COLOR = 7;
public final static int DEFAULT_BG_COLOR = 0;

public final static String DEFAULT_FONT ="monospace";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'=' is not followed by whitespace.

@fat-tire
Copy link
Contributor Author

Hey @Kruton-- quick question-- this commit, #612, #611, #610, #609 etc have been sitting around for 7 months now and are going out of date. I'm also looking forward to #627, #615, and others. Is there anything further that needs to be done to get you to accept these commits? I thought maybe the project was dead, but I see there is ongoing development in the last few weeks.

I'd like to keep the Connectbot up to date on my chromebook with upstream changes, but w/the font and other support that I see languishing in the PR section.

Please advise & happy holidays.

@kruton
Copy link
Member

kruton commented Dec 24, 2018

Sorry @fat-tire I'm rewriting everything involving the UI and I'm a bit behind schedule. I'll take a look at all these PRs and get them working with the new UI rewrite.

@fat-tire
Copy link
Contributor Author

@kruton -- Gotcha. That's exciting to hear. Looking forward to the new UI and the updates!

Happy holidays (again)

@fat-tire
Copy link
Contributor Author

Hey quick update-- since this was written almost a year ago, androidX/Jetpack was introduced by Google, so you'll probably want to replace:

import android.support.v4.provider.FontRequest;
import android.support.v4.provider.FontsContractCompat;

with

import androidx.core.provider.FontRequest;
import androidx.core.provider.FontsContractCompat;

And of course add the above to build.gradle.

Cheers.

@kruton kruton closed this Jul 3, 2020
@oblitum
Copy link

oblitum commented Sep 11, 2022

Hey folks, could someone share what happened here, the PR was great forever with merge on hold, then it suddenly just died without any explanation? I really wished this for support of nerd fonts.

@oblitum
Copy link

oblitum commented Sep 12, 2022

Nevermind... just moved to Termux.

@fat-tire
Copy link
Contributor Author

Dunno what happened besides four+ years passing. 🤷‍♂️

@oblitum
Copy link

oblitum commented Sep 12, 2022

@fat-tire, okay no problem, Termux is just much better and I was missing on it, so it was in the end good for me to have this missing which forced into alternatives. Sad your work seem to have been wasted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants