mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fix various typos
* Add TODO notes for typos that should be fixed for 5.0 Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
@@ -3173,7 +3173,7 @@ void SystemFont::_update_base_font() {
|
||||
base_font.unref();
|
||||
}
|
||||
|
||||
face_indeces.clear();
|
||||
face_indices.clear();
|
||||
ftr_weight = 0;
|
||||
ftr_stretch = 0;
|
||||
ftr_italic = 0;
|
||||
@@ -3211,17 +3211,17 @@ void SystemFont::_update_base_font() {
|
||||
score += 30;
|
||||
}
|
||||
if (score > best_score) {
|
||||
face_indeces.clear();
|
||||
face_indices.clear();
|
||||
}
|
||||
if (score >= best_score) {
|
||||
best_score = score;
|
||||
face_indeces.push_back(i);
|
||||
face_indices.push_back(i);
|
||||
}
|
||||
}
|
||||
if (face_indeces.is_empty()) {
|
||||
face_indeces.push_back(0);
|
||||
if (face_indices.is_empty()) {
|
||||
face_indices.push_back(0);
|
||||
}
|
||||
file->set_face_index(0, face_indeces[0]);
|
||||
file->set_face_index(0, face_indices[0]);
|
||||
|
||||
// If it's a variable font, apply weight, stretch and italic coordinates to match requested style.
|
||||
if (best_score != 150) {
|
||||
@@ -3275,7 +3275,7 @@ void SystemFont::reset_state() {
|
||||
}
|
||||
|
||||
names.clear();
|
||||
face_indeces.clear();
|
||||
face_indices.clear();
|
||||
ftr_weight = 0;
|
||||
ftr_stretch = 0;
|
||||
ftr_italic = 0;
|
||||
@@ -3579,9 +3579,9 @@ RID SystemFont::find_variation(const Dictionary &p_variation_coordinates, int p_
|
||||
var[TS->name_to_tag("italic")] = ftr_italic;
|
||||
}
|
||||
|
||||
if (!face_indeces.is_empty()) {
|
||||
int face_index = CLAMP(p_face_index, 0, face_indeces.size() - 1);
|
||||
return f->find_variation(var, face_indeces[face_index], p_strength, p_transform, p_spacing_top, p_spacing_bottom, p_spacing_space, p_spacing_glyph, p_baseline_offset);
|
||||
if (!face_indices.is_empty()) {
|
||||
int face_index = CLAMP(p_face_index, 0, face_indices.size() - 1);
|
||||
return f->find_variation(var, face_indices[face_index], p_strength, p_transform, p_spacing_top, p_spacing_bottom, p_spacing_space, p_spacing_glyph, p_baseline_offset);
|
||||
} else {
|
||||
return f->find_variation(var, 0, p_strength, p_transform, p_spacing_top, p_spacing_bottom, p_spacing_space, p_spacing_glyph, p_baseline_offset);
|
||||
}
|
||||
@@ -3592,7 +3592,7 @@ RID SystemFont::find_variation(const Dictionary &p_variation_coordinates, int p_
|
||||
RID SystemFont::_get_rid() const {
|
||||
Ref<Font> f = _get_base_font_or_default();
|
||||
if (f.is_valid()) {
|
||||
if (!face_indeces.is_empty()) {
|
||||
if (!face_indices.is_empty()) {
|
||||
Dictionary var;
|
||||
if (ftr_weight > 0) {
|
||||
var[TS->name_to_tag("weight")] = ftr_weight;
|
||||
@@ -3603,7 +3603,7 @@ RID SystemFont::_get_rid() const {
|
||||
if (ftr_italic > 0) {
|
||||
var[TS->name_to_tag("italic")] = ftr_italic;
|
||||
}
|
||||
return f->find_variation(var, face_indeces[0]);
|
||||
return f->find_variation(var, face_indices[0]);
|
||||
} else {
|
||||
return f->_get_rid();
|
||||
}
|
||||
@@ -3612,7 +3612,7 @@ RID SystemFont::_get_rid() const {
|
||||
}
|
||||
|
||||
int64_t SystemFont::get_face_count() const {
|
||||
return face_indeces.size();
|
||||
return face_indices.size();
|
||||
}
|
||||
|
||||
SystemFont::SystemFont() {
|
||||
|
||||
Reference in New Issue
Block a user