diff --git a/apps/code/console_controller.cpp b/apps/code/console_controller.cpp index 2217acb4c..528b2556f 100644 --- a/apps/code/console_controller.cpp +++ b/apps/code/console_controller.cpp @@ -333,7 +333,7 @@ void ConsoleController::autoImportScript(Script script, bool force) { if (script.importationStatus() || force) { // Step 1 - Create the command "from scriptName import *". - assert(strlen(k_importCommand1) + strlen(script.name()) - strlen(ScriptStore::k_scriptExtension) + strlen(k_importCommand2) + 1 <= k_maxImportCommandSize); + assert(strlen(k_importCommand1) + strlen(script.fullName()) - strlen(ScriptStore::k_scriptExtension) - 1 + strlen(k_importCommand2) + 1 <= k_maxImportCommandSize); char command[k_maxImportCommandSize]; // Copy "from " diff --git a/apps/graph/graph/integral_graph_controller.cpp b/apps/graph/graph/integral_graph_controller.cpp index 36d7491b9..c3886e2b5 100644 --- a/apps/graph/graph/integral_graph_controller.cpp +++ b/apps/graph/graph/integral_graph_controller.cpp @@ -42,7 +42,7 @@ Layout IntegralGraphController::createFunctionLayout(StorageFunction * function) const char * dx = "dx"; int numberOfChars = function->nameWithArgument(buffer, bufferSize-strlen(dx), StorageCartesianFunctionStore::Symbol()); strlcpy(buffer+numberOfChars, dx, bufferSize-numberOfChars); - return LayoutHelper::String(buffer, strlen(buffer), KFont::SmallFont); + return LayoutHelper::String(buffer, strlen(buffer), KDFont::SmallFont); } } diff --git a/apps/graph/list/text_field_function_title_cell.cpp b/apps/graph/list/text_field_function_title_cell.cpp index 6bc385f0d..552fde782 100644 --- a/apps/graph/list/text_field_function_title_cell.cpp +++ b/apps/graph/list/text_field_function_title_cell.cpp @@ -4,10 +4,10 @@ namespace Graph { -TextFieldFunctionTitleCell::TextFieldFunctionTitleCell(StorageListController * listController, Orientation orientation, KDText::FontSize size) : +TextFieldFunctionTitleCell::TextFieldFunctionTitleCell(StorageListController * listController, Orientation orientation, const KDFont * font) : Shared::FunctionTitleCell(orientation), Responder(listController), - m_textField(Shared::StorageFunction::k_parenthesedArgumentLength, this, m_textFieldBuffer, m_textFieldBuffer, k_textFieldBufferSize, listController, false, size, 0.5f, 0.5f) + m_textField(Shared::StorageFunction::k_parenthesedArgumentLength, this, m_textFieldBuffer, m_textFieldBuffer, k_textFieldBufferSize, listController, false, font, 0.5f, 0.5f) {} void TextFieldFunctionTitleCell::setHighlighted(bool highlight) { diff --git a/apps/graph/list/text_field_function_title_cell.h b/apps/graph/list/text_field_function_title_cell.h index 8af75bd11..f719668d6 100644 --- a/apps/graph/list/text_field_function_title_cell.h +++ b/apps/graph/list/text_field_function_title_cell.h @@ -11,7 +11,7 @@ class StorageListController; class TextFieldFunctionTitleCell : public Shared::FunctionTitleCell, public Responder { public: - TextFieldFunctionTitleCell(StorageListController * listController, Orientation orientation = Orientation::VerticalIndicator, KDText::FontSize size = KDText::FontSize::Large); + TextFieldFunctionTitleCell(StorageListController * listController, Orientation orientation = Orientation::VerticalIndicator, const KDFont * font = KDFont::LargeFont); TextField * textField() { return &m_textField; } void setEditing(bool editing); bool isEditing() const; @@ -19,7 +19,7 @@ public: // FunctionTitleCell void setColor(KDColor color) override; - KDText::FontSize fontSize() const override { return m_textField.fontSize(); } + const KDFont * font() const override { return m_textField.font(); } // EvenOddCell void setEven(bool even) override; // HighlightCell diff --git a/apps/graph/values/storage_values_controller.cpp b/apps/graph/values/storage_values_controller.cpp index 76f666804..dec848f65 100644 --- a/apps/graph/values/storage_values_controller.cpp +++ b/apps/graph/values/storage_values_controller.cpp @@ -17,7 +17,7 @@ StorageValuesController::StorageValuesController(Responder * parentResponder, In { for (int i = 0; i < k_maxNumberOfFunctions; i++) { m_functionTitleCells[i].setOrientation(FunctionTitleCell::Orientation::HorizontalIndicator); - m_functionTitleCells[i].setFontSize(KDText::FontSize::Small); + m_functionTitleCells[i].setFont(KDFont::SmallFont); } } diff --git a/apps/sequence/sequence_title_cell.h b/apps/sequence/sequence_title_cell.h index 31fc904d0..ae719a297 100644 --- a/apps/sequence/sequence_title_cell.h +++ b/apps/sequence/sequence_title_cell.h @@ -13,8 +13,8 @@ public: void setEven(bool even) override; void setHighlighted(bool highlight) override; void setColor(KDColor color) override; - KDText::FontSize fontSize() const override { - return Poincare::CharLayoutNode::k_defaultFontSize; + const KDFont * font() const override { + return Poincare::CharLayoutNode::k_defaultFont; } Poincare::Layout layout() const override { return m_titleTextView.layout(); diff --git a/apps/shared/buffer_function_title_cell.h b/apps/shared/buffer_function_title_cell.h index fe4718781..e80c99b3f 100644 --- a/apps/shared/buffer_function_title_cell.h +++ b/apps/shared/buffer_function_title_cell.h @@ -13,7 +13,7 @@ public: void setColor(KDColor color) override; void setText(const char * textContent); void setFont(const KDFont * font) { m_bufferTextView.setFont(font); } - KDFont * font() const override { return m_bufferTextView.font(); } + const KDFont * font() const override { return m_bufferTextView.font(); } const char * text() const override { return m_bufferTextView.text(); } diff --git a/apps/shared/function_title_cell.h b/apps/shared/function_title_cell.h index 4af9fd8f9..604d44fbc 100644 --- a/apps/shared/function_title_cell.h +++ b/apps/shared/function_title_cell.h @@ -15,7 +15,7 @@ public: void setOrientation(Orientation orientation); virtual void setColor(KDColor color); void drawRect(KDContext * ctx, KDRect rect) const override; - virtual KDText::FontSize fontSize() const = 0; + virtual const KDFont * font() const = 0; protected: constexpr static KDCoordinate k_separatorThickness = 1; constexpr static KDCoordinate k_colorIndicatorThickness = 2; diff --git a/apps/shared/storage_expression_model_list_controller.cpp b/apps/shared/storage_expression_model_list_controller.cpp index 28ba79fcc..24ace6951 100644 --- a/apps/shared/storage_expression_model_list_controller.cpp +++ b/apps/shared/storage_expression_model_list_controller.cpp @@ -24,7 +24,7 @@ KDCoordinate StorageExpressionModelListController::expressionRowHeight(int j) { return Metric::StoreRowHeight; } KDCoordinate modelHeight = m->layout().layoutSize().height(); - KDCoordinate modelHeightWithMargins = modelHeight + Metric::StoreRowHeight - KDText::charSize().height(); + KDCoordinate modelHeightWithMargins = modelHeight + Metric::StoreRowHeight - KDFont::LargeFont->glyphSize().height(); return Metric::StoreRowHeight > modelHeightWithMargins ? Metric::StoreRowHeight : modelHeightWithMargins; } diff --git a/apps/shared/storage_function_list_controller.cpp b/apps/shared/storage_function_list_controller.cpp index 41a0598c4..6b9a79857 100644 --- a/apps/shared/storage_function_list_controller.cpp +++ b/apps/shared/storage_function_list_controller.cpp @@ -14,12 +14,12 @@ StorageFunctionListController::StorageFunctionListController(Responder * parentR StorageFunctionListController * list = (StorageFunctionListController *)context; TabViewController * tabController = list->tabController(); tabController->setActiveTab(1); - }, this), KDText::FontSize::Small, Palette::PurpleBright), + }, this), KDFont::SmallFont, Palette::PurpleBright), m_valuesButton(this, I18n::Message::DisplayValues, Invocation([](void * context, void * sender) { StorageFunctionListController * list = (StorageFunctionListController *)context; TabViewController * tabController = list->tabController(); tabController->setActiveTab(2); - }, this), KDText::FontSize::Small, Palette::PurpleBright), + }, this), KDFont::SmallFont, Palette::PurpleBright), m_titlesColumnWidth(k_minTitleColumnWidth) { m_selectableTableView.setMargins(0); @@ -253,7 +253,7 @@ KDCoordinate StorageFunctionListController::maxFunctionNameWidth() { assert(dotPosition != nullptr); maxNameLength = max(maxNameLength, dotPosition-functionName); } - return (maxNameLength + StorageFunction::k_parenthesedArgumentLength) * KDText::charSize(titleCells(0)->fontSize()).width(); + return (maxNameLength + StorageFunction::k_parenthesedArgumentLength) * titleCells(0)->font()->glyphSize().width(); } void StorageFunctionListController::didChangeModelsList() { diff --git a/apps/shared/storage_sum_graph_controller.cpp b/apps/shared/storage_sum_graph_controller.cpp index ee36a3fe0..345d129f2 100644 --- a/apps/shared/storage_sum_graph_controller.cpp +++ b/apps/shared/storage_sum_graph_controller.cpp @@ -206,8 +206,8 @@ bool StorageSumGraphController::handleEnter() { StorageSumGraphController::LegendView::LegendView(StorageSumGraphController * controller, char sumSymbol) : m_sum(0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle), m_sumLayout(), - m_legend(KDText::FontSize::Small, I18n::Message::Default, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle), - m_editableZone(controller, m_draftText, m_draftText, TextField::maxBufferSize(), controller, false, KDText::FontSize::Small, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle), + m_legend(k_font, I18n::Message::Default, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle), + m_editableZone(controller, m_draftText, m_draftText, TextField::maxBufferSize(), controller, false, k_font, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle), m_sumSymbol(sumSymbol) { m_draftText[0] = 0; @@ -242,15 +242,15 @@ void StorageSumGraphController::LegendView::setSumSymbol(Step step, double start PrintFloat::convertFloatToText(start, buffer, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::MediumNumberOfSignificantDigits), Constant::MediumNumberOfSignificantDigits, Preferences::PrintFloatMode::Decimal); m_sumLayout = CondensedSumLayout( LayoutHelper::String(sigma, sizeof(sigma)), - LayoutHelper::String(buffer, strlen(buffer), KDText::FontSize::Small), - EmptyLayout(EmptyLayoutNode::Color::Yellow, false, KDText::FontSize::Small, false)); + LayoutHelper::String(buffer, strlen(buffer), k_font), + EmptyLayout(EmptyLayoutNode::Color::Yellow, false, k_font, false)); } else { m_sumLayout = LayoutHelper::String(sigma, sizeof(sigma)); char buffer[2+PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)]; PrintFloat::convertFloatToText(start, buffer, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, Preferences::PrintFloatMode::Decimal); - Layout start = LayoutHelper::String(buffer, strlen(buffer), KDText::FontSize::Small); + Layout start = LayoutHelper::String(buffer, strlen(buffer), KDFont::SmallFont); PrintFloat::convertFloatToText(end, buffer, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, Preferences::PrintFloatMode::Decimal); - Layout end = LayoutHelper::String(buffer, strlen(buffer), KDText::FontSize::Small); + Layout end = LayoutHelper::String(buffer, strlen(buffer), k_font); m_sumLayout = CondensedSumLayout( LayoutHelper::String(sigma, sizeof(sigma)), start, @@ -260,7 +260,7 @@ void StorageSumGraphController::LegendView::setSumSymbol(Step step, double start m_sumLayout = HorizontalLayout( m_sumLayout, functionLayout, - LayoutHelper::String(buffer, strlen(buffer), KDText::FontSize::Small)); + LayoutHelper::String(buffer, strlen(buffer), k_font)); } m_sum.setLayout(m_sumLayout); if (step == Step::Result) { @@ -303,13 +303,13 @@ void StorageSumGraphController::LegendView::layoutSubviews(Step step) { m_legend.setFrame(KDRectZero); } - KDSize largeCharSize = KDText::charSize(); + KDSize largeCharSize = KDFont::LargeFont->glyphSize(); switch(step) { case Step::FirstParameter: - m_editableZone.setFrame(KDRect(2*largeCharSize.width(), k_symbolHeightMargin+k_sigmaHeight/2, k_editableZoneWidth, k_editableZoneHeight)); + m_editableZone.setFrame(KDRect(2*largeCharSize.width(), k_symbolHeightMargin+k_sigmaHeight/2, editableZoneWidth(), editableZoneHeight())); return; case Step::SecondParameter: - m_editableZone.setFrame(KDRect(2*largeCharSize.width(), k_symbolHeightMargin+k_sigmaHeight/2-k_editableZoneHeight, k_editableZoneWidth, k_editableZoneHeight)); + m_editableZone.setFrame(KDRect(2*largeCharSize.width(), k_symbolHeightMargin+k_sigmaHeight/2-editableZoneHeight(), editableZoneWidth(), editableZoneHeight())); return; default: m_editableZone.setFrame(KDRectZero); diff --git a/apps/shared/storage_sum_graph_controller.h b/apps/shared/storage_sum_graph_controller.h index 679679558..6e17684e5 100644 --- a/apps/shared/storage_sum_graph_controller.h +++ b/apps/shared/storage_sum_graph_controller.h @@ -61,8 +61,9 @@ private: void setSumSymbol(Step step, double start = NAN, double end = NAN, double result = NAN, Poincare::Layout sequenceName = Poincare::Layout()); private: constexpr static KDCoordinate k_legendHeight = 35; - constexpr static KDCoordinate k_editableZoneWidth = 12*KDText::charSize(KDText::FontSize::Small).width(); - constexpr static KDCoordinate k_editableZoneHeight = KDText::charSize(KDText::FontSize::Small).height(); + constexpr static const KDFont * k_font = KDFont::SmallFont; + static KDCoordinate editableZoneWidth() { return 12*k_font->glyphSize().width(); } + static KDCoordinate editableZoneHeight() { return k_font->glyphSize().height(); } constexpr static KDCoordinate k_symbolHeightMargin = 8; constexpr static KDCoordinate k_sigmaHeight = 18; int numberOfSubviews() const override; diff --git a/apps/shared/storage_values_controller.cpp b/apps/shared/storage_values_controller.cpp index 188ef1197..1ac8f5795 100644 --- a/apps/shared/storage_values_controller.cpp +++ b/apps/shared/storage_values_controller.cpp @@ -23,7 +23,7 @@ StorageValuesController::StorageValuesController(Responder * parentResponder, Bu StorageValuesController * valuesController = (StorageValuesController *) context; StackViewController * stack = ((StackViewController *)valuesController->stackController()); stack->push(valuesController->intervalParameterController()); - }, this), KDText::FontSize::Small) + }, this), k_font) { m_selectableTableView.setVerticalCellOverlap(0); m_selectableTableView.setTopMargin(k_topMargin); @@ -32,12 +32,12 @@ StorageValuesController::StorageValuesController(Responder * parentResponder, Bu m_selectableTableView.setLeftMargin(k_leftMargin); m_selectableTableView.setBackgroundColor(Palette::WallScreenDark); m_selectableTableView.setIndicatorThickness(13); - m_abscissaTitleCell.setMessageFontSize(KDText::FontSize::Small); + m_abscissaTitleCell.setMessageFont(k_font); for (int i = 0; i < k_maxNumberOfAbscissaCells; i++) { m_abscissaCells[i].setParentResponder(&m_selectableTableView); m_abscissaCells[i].editableTextCell()->textField()->setDelegate(this); m_abscissaCells[i].editableTextCell()->textField()->setDraftTextBuffer(m_draftTextBuffer); - m_abscissaCells[i].editableTextCell()->textField()->setFontSize(KDText::FontSize::Small); + m_abscissaCells[i].editableTextCell()->textField()->setFont(k_font); } } diff --git a/apps/shared/storage_values_controller.h b/apps/shared/storage_values_controller.h index 2e8f45b45..3c71f0777 100644 --- a/apps/shared/storage_values_controller.h +++ b/apps/shared/storage_values_controller.h @@ -51,6 +51,7 @@ protected: int m_numberOfColumns; bool m_numberOfColumnsNeedUpdate; private: + static constexpr const KDFont * k_font = KDFont::SmallFont; virtual Ion::Storage::Record recordAtColumn(int i); Responder * tabController() const override; SelectableTableView * selectableTableView() override { return &m_selectableTableView; } diff --git a/apps/shared/text_field_with_extension.h b/apps/shared/text_field_with_extension.h index cddbed988..eea00eb75 100644 --- a/apps/shared/text_field_with_extension.h +++ b/apps/shared/text_field_with_extension.h @@ -14,7 +14,7 @@ public: size_t textBufferSize, ::TextFieldDelegate * delegate = nullptr, bool hasTwoBuffers = true, - KDText::FontSize size = KDText::FontSize::Large, + const KDFont * size = KDFont::LargeFont, float horizontalAlignment = 0.0f, float verticalAlignment = 0.5f, KDColor textColor = KDColorBlack, diff --git a/apps/solver/solutions_controller.cpp b/apps/solver/solutions_controller.cpp index ba3a08622..2e183d1da 100644 --- a/apps/solver/solutions_controller.cpp +++ b/apps/solver/solutions_controller.cpp @@ -152,7 +152,7 @@ void SolutionsController::willDisplayCellAtLocation(HighlightCell * cell, int i, deltaCell->setLayout(m_delta2Layout); } else { EvenOddBufferTextCell * symbolCell = static_cast(cell); - symbolCell->setFontSize(KDFont::LargeFont); + symbolCell->setFont(KDFont::LargeFont); char bufferSymbol[Equation::k_maxVariableSize+1]; // Hold at maximum Delta = b^2-4ac or the variable name + a digit switch (m_equationStore->type()) { case EquationStore::Type::LinearSystem: diff --git a/apps/variable_box_empty_controller.cpp b/apps/variable_box_empty_controller.cpp index 4fda1f659..6882081e7 100644 --- a/apps/variable_box_empty_controller.cpp +++ b/apps/variable_box_empty_controller.cpp @@ -12,7 +12,7 @@ VariableBoxEmptyController::VariableBoxEmptyView::VariableBoxEmptyView() : { I18n::Message messages[k_numberOfMessages] = {I18n::Message::EmptyVariableBox0, I18n::Message::Default, I18n::Message::EmptyVariableBox1, I18n::Message::EmptyVariableBox2, I18n::Message::EmptyVariableBox3}; for (int i = 0; i < k_numberOfMessages; i++) { - m_messages[i].setFontSize(KDText::FontSize::Small); + m_messages[i].setFont(k_font); m_messages[i].setAlignment(0.5f, 0.5f); m_messages[i].setBackgroundColor(Palette::WallScreen); m_messages[i].setMessage(messages[i]); @@ -46,7 +46,7 @@ View * VariableBoxEmptyController::VariableBoxEmptyView::subviewAtIndex(int inde void VariableBoxEmptyController::VariableBoxEmptyView::layoutSubviews() { KDCoordinate width = bounds().width(); KDCoordinate height = bounds().height(); - KDCoordinate textHeight = KDText::charSize(KDText::FontSize::Small).height(); + KDCoordinate textHeight = k_font->glyphSize().height(); KDCoordinate layoutHeight = m_layoutExample.minimalSizeForOptimalDisplay().height(); KDCoordinate margin = (height - k_numberOfMessages*textHeight-layoutHeight)/2; m_layoutExample.setFrame(KDRect(0, margin+3*textHeight, width, layoutHeight)); @@ -83,14 +83,14 @@ void VariableBoxEmptyController::setType(Type type) { { message = I18n::Message::EmptyExpressionBox; char storeExpression[] = {'3', Ion::Charset::Sto, 'A', 0}; - layout = LayoutHelper::String(storeExpression, sizeof(storeExpression)-1, KDText::FontSize::Small); + layout = LayoutHelper::String(storeExpression, sizeof(storeExpression)-1, VariableBoxEmptyView::k_font); break; } case Type::Functions: { message = I18n::Message::EmptyFunctionBox; char storeFunction[] = {'3', '+', Graph::StorageCartesianFunctionStore::Symbol(), Ion::Charset::Sto, 'f', '(', Graph::StorageCartesianFunctionStore::Symbol(), ')', 0}; - layout = LayoutHelper::String(storeFunction, sizeof(storeFunction)-1, KDText::FontSize::Small); + layout = LayoutHelper::String(storeFunction, sizeof(storeFunction)-1, VariableBoxEmptyView::k_font); break; } default: diff --git a/apps/variable_box_empty_controller.h b/apps/variable_box_empty_controller.h index a7f33e5c6..a42c6cd01 100644 --- a/apps/variable_box_empty_controller.h +++ b/apps/variable_box_empty_controller.h @@ -20,6 +20,7 @@ public: private: class VariableBoxEmptyView : public View { public: + static constexpr const KDFont * k_font = KDFont::SmallFont; VariableBoxEmptyView(); void setMessage(I18n::Message message); void setLayout(Poincare::Layout layout); diff --git a/escher/include/escher/alternate_empty_view_delegate.h b/escher/include/escher/alternate_empty_view_delegate.h index 676a4cb9d..4912677b9 100644 --- a/escher/include/escher/alternate_empty_view_delegate.h +++ b/escher/include/escher/alternate_empty_view_delegate.h @@ -17,7 +17,7 @@ public: class AlternateEmptyViewDefaultDelegate : public AlternateEmptyViewDelegate { public: - AlternateEmptyViewDefaultDelegate() : m_message(KDText::FontSize::Small, (I18n::Message)0, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen) {} + AlternateEmptyViewDefaultDelegate() : m_message(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen) {} virtual I18n::Message emptyMessage() = 0; View * emptyView() override { m_message.setMessage(emptyMessage()); diff --git a/escher/include/escher/even_odd_buffer_text_cell.h b/escher/include/escher/even_odd_buffer_text_cell.h index 3fb1636b7..45e0405d5 100644 --- a/escher/include/escher/even_odd_buffer_text_cell.h +++ b/escher/include/escher/even_odd_buffer_text_cell.h @@ -11,8 +11,8 @@ public: void setFont(const KDFont * font) { m_bufferTextView.setFont(font); } - KDText::FontSize fontSize() const { - return m_bufferTextView.fontSize(); + const KDFont * font() const { + return m_bufferTextView.font(); } void setAlignment(float horizontalAlignment, float verticalAlignment) { m_bufferTextView.setAlignment(horizontalAlignment, verticalAlignment); diff --git a/escher/include/escher/text_field.h b/escher/include/escher/text_field.h index 15fb348dc..0dde7d91d 100644 --- a/escher/include/escher/text_field.h +++ b/escher/include/escher/text_field.h @@ -30,7 +30,7 @@ public: } void scrollToCursor() override; bool shouldFinishEditing(Ion::Events::Event event) override { return m_delegate->textFieldShouldFinishEditing(this, event); } - KDText::FontSize fontSize() const { return m_contentView.fontSize(); } + const KDFont * font() const { return m_contentView.font(); } protected: class ContentView : public TextInput::ContentView { public: diff --git a/escher/include/escher/text_view.h b/escher/include/escher/text_view.h index c57b5ca65..1677817e8 100644 --- a/escher/include/escher/text_view.h +++ b/escher/include/escher/text_view.h @@ -18,7 +18,7 @@ public: KDSize minimalSizeForOptimalDisplay() const override; virtual const char * text() const = 0; virtual void setText(const char * text) = 0; - KDFont * font() const { return m_font; } + const KDFont * font() const { return m_font; } void setFont(const KDFont * font); protected: #if ESCHER_VIEW_LOGGING diff --git a/poincare/include/poincare/char_layout.h b/poincare/include/poincare/char_layout.h index 7e944649e..1843f0b4a 100644 --- a/poincare/include/poincare/char_layout.h +++ b/poincare/include/poincare/char_layout.h @@ -9,8 +9,8 @@ namespace Poincare { class CharLayoutNode final : public LayoutNode { public: - static constexpr KDFont * k_defaultFontSize = KDFont::LargeFont; - CharLayoutNode(char c = Ion::Charset::Empty, const KDFont * font = k_defaultFontSize) : + static constexpr const KDFont * k_defaultFont = KDFont::LargeFont; + CharLayoutNode(char c = Ion::Charset::Empty, const KDFont * font = k_defaultFont) : LayoutNode(), m_char(c), m_font(font)