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

Updating fonts to support lessons in Ukrainian #133

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

olexandr-konovalov
Copy link

Following the hints in #120, I have:

I haven't tested it, since I lack knowledge about building local version of the Carpentries lesson using custom version of varnish. I would be grateful if someone can test it (maybe build the lesson at https://github.com/ukrainian-carpentries/git-novice and post a screenshot of some page here) or point me to the instructions for building it myself.

Closes #120

@ErinBecker
Copy link
Contributor

Sorry for the delay in getting this tested @olexandr-konovalov. It took me a bit of learning to figure out how to render lessons using dovetail (although @joelnitta's guide here made things much clearer!).

I did get the ukranian-carpentries/git-novice lesson rendered locally with both the current version of varnish and the version included in this PR, however, I'm not seeing any difference in the rendered fonts (see screenshot below, official varnish on top, this PR on bottom):

Screenshot 2024-08-23 at 10 09 09 AM

It seems like the fonts you've loaded aren't being found?

For reference, the way to test with a custom version of varnish is to run the following in your R session:

install.packages(devtools)
library(devtools)
devtools::install_github("carpentries/varnish#133") 

library(dovetail)
render_trans_from_branch(lang = "uk")

Pinging @froggleston here in case he knows more about where/how new fonts are integrated and if there's a setting I'm missing here.

@olexandr-konovalov
Copy link
Author

olexandr-konovalov commented Aug 24, 2024

Many thanks for testing this, @ErinBecker! Indeed, it does not change the fonts. Will be waiting to hear from @froggleston

@froggleston
Copy link
Contributor

Does this look better @olexandr-konovalov ?
image

If so, the issue is that styles.css.scss needs to be modified to refer to the new fonts, referring to Mulish-Regular instead of mulish-v5-latin-regular:

/* mulish-regular */
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 400;
  src: font('Mulish-Regular.eot'); /* IE9 Compat Modes */
  src: local(''),
       font('Mulish-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       font('Mulish-Regular.woff2') format('woff2'), /* Super Modern Browsers */
       font('Mulish-Regular.woff') format('woff'), /* Modern Browsers */
       font('Mulish-Regular.ttf') format('truetype'), /* Safari, Android, iOS */
       font('Mulish-Regular.svg#Mulish') format('svg'); /* Legacy iOS */

}

To test locally, the stylesheets can be rebuilt with bash squash-sass.sh as per the varnish docs and the lesson re-built and re-rendered using the code Erin posted above.

@olexandr-konovalov
Copy link
Author

@froggleston hooray, yes, thanks, this seems to be exactly what's needed! I can try to test it locally, if you think it will be useful, but otherwise I think we can go ahead with the change.

@froggleston
Copy link
Contributor

froggleston commented Oct 23, 2024

Thanks for the feedback @olexandr-konovalov ! I'll push a commit to address it!

In the meantime, could you merge in varnish main to this PR and we should then be in a good spot to merge it all in.

@olexandr-konovalov
Copy link
Author

@froggleston thanks - do you mean I can rebase my branch on top of the latest main perhaps?

@olexandr-konovalov
Copy link
Author

@froggleston rebased - please check.

@froggleston froggleston merged commit b2b359b into carpentries:main Oct 30, 2024
1 check passed
@olexandr-konovalov olexandr-konovalov deleted the ukrainian-font branch October 31, 2024 00:34
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.

Updating fonts for lessons in Ukrainian
3 participants