1 Debian patch touch this file
-
Fix ivy dependencies.
- Author
- Bas Couwenberg <[email protected]>
- Bug
- https://josm.openstreetmap.de/ticket/24839
- Forwarded
- not-needed
| •1 | /* |
| 2 | * MIT License |
| 3 | * |
| 4 | * Copyright (c) 2022-2023 Jannis Weis |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and |
| 7 | * associated documentation files (the "Software"), to deal in the Software without restriction, |
| 8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, |
| 9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is |
| 10 | * furnished to do so, subject to the following conditions: |
| 11 | * |
| 12 | * The above copyright notice and this permission notice shall be included in all copies or |
| 13 | * substantial portions of the Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT |
| 16 | * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
| 18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 20 | * |
| 21 | */ |
| 22 | package com.github.weisj.jsvg.attributes.text; |
| 23 | |
| 24 | import org.jetbrains.annotations.NotNull; |
| 25 | |
| 26 | import com.github.weisj.jsvg.attributes.Default; |
| 27 | import com.github.weisj.jsvg.attributes.HasMatchName; |
| 28 | |
| 29 | public enum DominantBaseline implements HasMatchName { |
| 30 | /** |
| 31 | * If this property occurs on a <text> element, then the computed value depends on the value of the writing-mode |
| 32 | * attribute. |
| 33 | * <p> |
| 34 | * If the writing-mode is horizontal, then the value of the dominant-baseline component is alphabetic. |
| 35 | * Otherwise, if the writing-mode is vertical, then the value of the dominant-baseline component is central. |
| 36 | * <p> |
| 37 | * If this property occurs on a 'tspan', 'tref', 'altGlyph', or 'textPath' element, then the dominant-baseline |
| 38 | * and the baseline-table components remain the same as those of the parent text content element. |
| 39 | * <p> |
| 40 | * If the computed baseline-shift value actually shifts the baseline, then the baseline-table font-size component |
| 41 | * is set to the value of the font-size attribute on the element on which the dominant-baseline attribute occurs, |
| 42 | * otherwise the baseline-table font-size remains the same as that of the element. |
| 43 | * <p> |
| 44 | * If there is no parent text content element, the scaled-baseline-table value is constructed as above for 'text' |
| 45 | * elements. |
| 46 | */ |
| 47 | @Default |
| 48 | Auto, |
| 49 | /** |
| 50 | * The baseline-identifier for the dominant-baseline is set to be ideographic, the derived baseline-table is |
| 51 | * constructed using the ideographic baseline-table in the font, and the baseline-table font-size is changed to the |
| 52 | * value of the font-size attribute on this element. |
| 53 | */ |
| 54 | Ideographic, |
| 55 | /** |
| 56 | * The baseline-identifier for the dominant-baseline is set to be alphabetic, the derived baseline-table is |
| 57 | * constructed using the alphabetic baseline-table in the font, and the baseline-table font-size is changed to the |
| 58 | * value of the font-size attribute on this element. |
| 59 | */ |
| 60 | Alphabetic, |
| 61 | /** |
| 62 | * The baseline-identifier for the dominant-baseline is set to be hanging, the derived baseline-table is |
| 63 | * constructed using the hanging baseline-table in the font, and the baseline-table font-size is changed to the |
| 64 | * value of the font-size attribute on this element. |
| 65 | */ |
| 66 | Hanging, |
| 67 | /** |
| 68 | * The baseline-identifier for the dominant-baseline is set to be mathematical, the derived baseline-table is |
| 69 | * constructed using the mathematical baseline-table in the font, and the baseline-table font-size is changed to |
| 70 | * the value of the font-size attribute on this element. |
| 71 | */ |
| 72 | Mathematical, |
| 73 | /** |
| 74 | * The baseline-identifier for the dominant-baseline is set to be central. The derived baseline-table is |
| 75 | * constructed from the defined baselines in a baseline-table in the font. That font baseline-table is chosen |
| 76 | * using the following priority order of baseline-table names: ideographic, alphabetic, hanging, mathematical. |
| 77 | * The baseline-table font-size is changed to the value of the font-size attribute on this element. |
| 78 | */ |
| 79 | Central, |
| 80 | /** |
| 81 | * The baseline-identifier for the dominant-baseline is set to be middle. The derived baseline-table is |
| 82 | * constructed from the defined baselines in a baseline-table in the font. That font baseline-table is chosen |
| 83 | * using the following priority order of baseline-table names: alphabetic, ideographic, hanging, mathematical. |
| 84 | * The baseline-table font-size is changed to the value of the font-size attribute on this element. |
| 85 | */ |
| 86 | Middle, |
| 87 | /** |
| 88 | * The baseline-identifier for the dominant-baseline is set to be text-after-edge. The derived baseline-table is |
| 89 | * constructed from the defined baselines in a baseline-table in the font. The choice of which font baseline-table |
| 90 | * to use from the baseline-tables in the font is browser dependent. The baseline-table font-size is changed to |
| 91 | * the value of the font-size attribute on this element. |
| 92 | */ |
| 93 | TextAfterEdge("text-after-edge"), |
| 94 | TextBottom("text-bottom"), |
| 95 | /** |
| 96 | * The baseline-identifier for the dominant-baseline is set to be text-before-edge. The derived baseline-table is |
| 97 | * constructed from the defined baselines in a baseline-table in the font. The choice of which baseline-table to |
| 98 | * use from the baseline-tables in the font is browser dependent. The baseline-table font-size is changed to the |
| 99 | * value of the font-size attribute on this element. |
| 100 | */ |
| 101 | TextBeforeEdge("text-before-edge"), |
| 102 | /** |
| 103 | * This value uses the top of the em box as the baseline. |
| 104 | */ |
| 105 | TextTop("text-top"); |
| 106 | |
| 107 | private final @NotNull String matchName; |
| 108 | |
| 109 | DominantBaseline(@NotNull String matchName) { |
| 110 | this.matchName = matchName; |
| 111 | } |
| 112 | |
| 113 | DominantBaseline() { |
| 114 | this.matchName = name(); |
| 115 | } |
| 116 | |
| 117 | @Override |
| 118 | public @NotNull String matchName() { |
| 119 | return matchName; |
| 120 | } |
| 121 | } |