This repository has been archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: Create a fonts.less file which generates identical css to fonts.css, but using less rules to be more understandable and customizable. For example, add the ability to change where the fonts directory is located (instead of mandating it be located next to the less file), and add the ability to disable specific font formats (like disable EOTs when IE8 support isn't needed). Test Plan: - Ensure that the test page and huxley page still work - Ensure that the output of `./node_modules/.bin/lessc static/fonts.less` is the same as the original css by running both through `./node_modules/.bin/cleancss` and diffing them. - Ensure that the huxley screenshots haven't changed - Ensure that the build step still works Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D13326
Contrary to other web font formats, the new WOFF 2.0 Web Font compression format is optimized for file size, memory usage, and decompression speed. WOFF2 has been supported in Chrome and Opera for a while now. See https://dev.opera.com/blog/opera-23/ for more info.
Add WOFF2 versions of the fonts
Summary: Fixes #207. Test Plan: Crossed fingers. Reviewers: emily Reviewed By: emily Differential Revision: https://phabricator.khanacademy.org/D16871
This is part 1 of 3. Rendering, screenshots, MathML, and unit tests will follow in susbequent pull requests.
Adds font metrics to support font commands.
Summary: I've been experimenting with delivering a TrueType-only KaTeX build for our mobile apps. I couldn't get anything to render properly until I flipped the `format` specifier from `ttf` to `truetype`. Though I can't find a definitive source on this, all the examples I've seen online use `truetype` over `ttf`, and flipping from `ttf` to `truetype` fixed my own issues. It's unlikely that this has been much of a problem in practice, since so many browsers now support WOFF (I'm considering a TrueType-only build since it's the least common denominator across Android 4.3+ and mobile Safari). Test Plan: - To force TrueType rendering, comment out the `.use-eot`, `.use-woff2`, and `.use-woff` lines in `fonts.less`. - Run `make serve`. - Open up the demo page. - Verify that the demo text is rendered as before (only the parens are noticeably different in the demo?). Reviewers: kevinb, emily Reviewed By: emily Subscribers: benkomalo Differential Revision: https://phabricator.khanacademy.org/D29274
I think original Git history should be preserved. Also, this repo seems to be missing a LICENSE. |
@ylemkimon I'm not sure how to migrate the git history. Do you know how? I will definitely add a LICENSE file. |
I think we can rewrite git history only for git clone https://github.com/Khan/KaTeX.git
cd KaTeX
git remote rm origin # to prevent from accidental push
git filter-branch --prune-empty --subdirectory-filter static -- --all
git filter-branch -f --prune-empty --index-filter "git rm --cached --ignore-unmatch $(git ls-files | grep -v 'fonts.less')" # single/double quote handling may differ
cd ..
git clone https://github.com/KaTeX/katex-fonts.git
cd katex-fonts
git checkout -b <branch name>
git remote add KaTeX ../KaTeX
git fetch KaTeX
git branch KaTeX remotes/KaTeX/master
git merge --allow-unrelated-histories KaTeX
git remote rm KaTeX |
kevinbarabash
force-pushed
the
fonts_less
branch
from
January 28, 2018 22:16
d6a78a9
to
b16404e
Compare
@ylemkimon thanks for the gitfu. It worked like a charm except for the
|
kevinbarabash
added
GH Review: need review
and removed
GH Review: needs revision
labels
Jan 28, 2018
ylemkimon
approved these changes
Jan 29, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This will allow us to remove the symlink from Khan/KaTeX to
this repo's font folder without changing any of the paths in
fonts.less.
Test Plan: