Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Rename `gfx` to `fonts` (#32556) | Martin Robinson | 2024-06-19 | 90 | -9856/+0 |
| | | | | | | | | | This crate only takes care of fonts now as graphics related things are split into other crates. In addition, this exposes data structures at the top of the crate, hiding the implementation details and making it simpler to import them. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com> | ||||
* | Add test for FontContext/FontGroup functionality | Jon Leighton | 2018-02-22 | 54 | -0/+119 |
| | | | | | | | | | | | | | | | | | | | | | | Unfortunately, this required quite a bit of changes to the non-test code. That's because FontContext depends on a FontCacheThread, which in turn depends on a CoreResourceThread and therefore lots of other data structures. It seemed like it would be very difficult to instantiate a FontContext as it was, and even if we could it seems like overkill to have all these data structures present for a relatively focused test. Therefore, I created a FontSource trait which represents the interface which FontContext uses to talk to FontCacheThread. FontCacheThread then implements FontSource. Then, in the test, we can create a dummy implementation of FontSource rather than using FontCacheThread. This actually has the advantage that we can make our dummy implementation behave in certain specific way which are useful for testing, for example it can count the number of times find_font_template() is called, which helps us verify that caching/lazy-loading is working as intended. | ||||
* | Fix FontTemplateDescriptor under FreeType | Jon Leighton | 2018-02-07 | 36 | -0/+9737 |
Issue #17321. Under Linux, using "font-family: sans-serif" previously caused Servo to select the "UltraLight" face (of DejaVu Sans). There were two reasons for this: 1. Font weight was only retrieved from the OS/2 table for bold faces. This neglected to retrieve the weight information for "lighter than normal" weight faces. This meant that the UltraLight face appeared as normal weight, and was selected. 2. Retrieval of font stretch information from the OS/2 table was not implemented at all. |