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
Cleanup makeOrd Function #1175
Comments
@rrandallcainc this probably doesn't fit within the scope of what you were thinking of but someday it would be nice if we had an IR were the ord nodes contained exactly what font each character should be rendered as. |
@kevinbarabash Perhaps a function that maps the various font properties from #1111 into that actual font would be just as good, and perhaps the main role of |
I think if we split it up into two mappings that may simplify things. Those two mappings might be:
|
Mapping to CSS classes may also require knowing the parent CSS classes, to avoid repetition. Or maybe that's a third step, checking how your desired CSS class differs from the parent and thus what needs specifying. |
@edemaine By a function that maps the various properties, were you referring to something like this? https://github.com/Khan/KaTeX/blob/master/src/buildCommon.js#L601 @kevinbarabash I'm a little fuzzy on what you mean by "IR were the ord nodes contained exactly what font each character should be rendered as.". Are you referring to something like: render "hello" as |
It's been a little while since opening this. I'll start taking a look at this. |
I was thinking that each character within the IR would have a specific font style. |
Currently the
makeOrd
function does too much. The purpose of this is to clean it up and make it more readable.From: #1111
The text was updated successfully, but these errors were encountered: