alfredxing / brick

Open-source webfont service
http://brick.im
2.87k stars 95 forks source link

Create new default branch + finished character map implementation #135

Open phoenixenero opened 8 years ago

phoenixenero commented 8 years ago

I'm nearly finished on the character map generation feature for Brick. But we need a new default branch to publish updates to.


My implementation of the charmap generation relies on 3 Ruby (.rb) scripts.

Example:

20
21
22
...
ffff

Example:

005a
005b
005c
...
0f2a
0f2b

We can then use the new templates in the _layouts/font.html file.

Example:

<table>
    <tr>
        <td>&#x0020;</td>
        <td>&#x0021;</td>
        <td>&#x0022;</td>
        ...
        <td>&#x0029;</td>
    </tr>
    <tr>
        <td>&#x002a;</td>
        <td>&#x002b;</td>
        <td>&#x002c;</td>
        ...
        <td>&#x0032;</td>
    </tr>
    ...
</table>

I made a bash (.sh) script that runs these .rb scripts in order for convenience.


Because we're hosted on Github Pages, we need another branch – say, master – to do main development on. @alfredxing can run the tools everytime there's a new font and pull them in the gh-pages branch. This would also be future proof, on the event we also implement Font Subsetting.

When you create the branch I'll make a PR.

Thanks!

alfredxing commented 8 years ago

Sounds reasonable. I'll probably set up Travis to do automatic deploys for this as well as pushing to the origin server.

How's the performance of running these scripts?

phoenixenero commented 8 years ago

30-35 seconds to run.